• Resolved spiretop

    (@spiretop)


    Can you better document how to use the taxonomy_filter function? Specifically what is a ‘taxonomy_key’ and how I set it and the ‘taxonomy_terms’ to only show one group of slides in a slideshow?

    I figured it out once I started writing this, but it wasn’t intuitive. In order to show only the slides in a group with the slug of ‘active’ this was the syntax:

    ‘taxonomy_filter’ => true, // [ true | false ] – Set to true to filter by taxonomy
    ‘taxonomy_key’ => ‘conveyor_group’, // The key of the taxonomy we wish to filter by
    ‘taxonomy_terms’ => ‘active’ // The terms (uses slug), will accept a string or array

    It wasn’t clear which things I was supposed to change. Thanks.

    https://www.ads-software.com/plugins/conveyor/

Viewing 1 replies (of 1 total)
  • Plugin Author Matt Watson

    (@mwtsn)

    Hi spiretop,

    The taxonomy filter uses the standard WP_Query tax_query, as documented in the codex here: https://codex.www.ads-software.com/Class_Reference/WP_Query#Taxonomy_Parameters if you give that a read it should become a little clearer for you.

    The first parameter ‘taxonomy_filter’ will determine if the plugin should be filtered by taxonomy or not. If this is set to true then the other two fields apply.

    ‘taxonomy_key’ is the name of the taxonomy you wish to filter by. By default it is set to ‘conveyor_group’ as this is the taxonomy that is provided by the plugin, but you can filter by any taxonomy you wish, as you may have added your own.

    Finally ‘taxonomy_terms’ is the term (or terms) within the taxonomy that you wish to filter by. So if you have created (and selected) a category on your slides of ‘featured’ then entering the slug of that term here will bring back only those slides that have the category of ‘featured’.

Viewing 1 replies (of 1 total)
  • The topic ‘Using Taxonomy Filters’ is closed to new replies.