This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Isotope Filtering with Custom Taxonomy

  • Creator
  • #25216

    I am setting up several custom post types some of which have their own custom taxonomies. I am trying to set up a page with a post grid with filtering but it looks like the only options to filter by are the built in categories/tags or your portfolio plugin categories/tags. Is it possible to set up a post grid page with filtering using a custom taxonomy without having to custom build something?

Viewing 1 replies (of 1 total)
  • Author
  • #25217
    Jason Bobich


    Yup, it’s possible. I’ll paste the answer I gave on another theme, which applies. You can expand the code to apply to the post grid element, as well.


    I don’t believe anything needs to be changed within the theme. If you pass through your taxonomy slug, it should work. Passing in your taxonomy slug should just mean making it a selection from the Post Showcase layout builder element, so the correct value can get saved to the element’s options. The Portfolios plugin does this, if you want to use it as an example.

    From your child theme’s functions.php, you’d basically just be doing what the portfolios plugin does here, in order to add your value to the layout builder’s options.

    But knowing that you only want to modify the post_showcase element, you could simplify this to be something more like this:

    function my_elements( $elements ) {
    	$elements['post_showcase']['options']['filter']['options']['topic'] = 'Filtered by topic';
    	return $elements;
    add_filter('themeblvd_elements', 'my_elements');

    Note that the above code is modifying specifically this in the layout builder plugin. Knowing what you’re editing can help you to understand the complex traverse of array within array you see in the code snippet I just wrote.

    This is sort of off the top of my head. Let me know if this doesn’t work.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.