• My site has several custom post types, each with their own taxonomies. Each cpt has its own instance of AWQSF which is set up for that specific cpt.

    There is one taxonomy, ‘town’, which is common to all cpts.

    The taxonomies each have many terms, so I’m using “Hide Empty”.

    The problem I’m having is that the ‘town’ dropdown for each instance of AWQSF is displaying an identical list of terms – i.e. ALL of the terms of the taxonomy in use by ALL cpts, not just the cpt for which the specific instance of AWQSF is assigned.

    My question is, is there a way to limit this behaviour, so that when I select a post type for a particular instance of AWQSF, only tax terms that are actually in use by posts in that specific cpt are returned in the taxonomy selectors?

    http://wordpress.org/plugins/advance-wp-query-search-filter/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author TC.K

    (@wp_dummy)

    No, the options (or terms) are generated from the given taxonomy by the function get_terms(). If you want the generated terms are depending on cpt, then you have to write so script to get them.

    Thread Starter aljuk

    (@aljuk)

    Ah, that’s a shame.

    I expected “Choose the post type you want to include in the search” to mean exactly that. In my case the tax picker for any given post type is almost always going to produce an empty result set since it contains a majority of tax terms which are assigned to other post types, which makes it pointless.

    I’ve spent the morning trying different substitutions and hacks to the get_terms function in the plugin, but lucking out… If anyone reading this has a working solution, please feel free to chip in!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘tax picker returning terms for unselected post types’ is closed to new replies.