Support » Plugins » Plugin:[Query Multiple Taxonomies] Taxonomy dropdowns dissapear when no results

  • LilianaGaete


    First of all, thank you this plugin. It is exactly what I was looking for. Thanks for the good work, Scribu 🙂

    Today I have found some weird behaviour in some scenarios using this plugin.

    The first scenario is the following. Once I do a search using these filters and I get the matches, what happens is that the terms in the widget are limited to any matching results on the page, and I can’t do a clean search anymore.
    For example, I have a few taxonomies: Region, Country and Industry. They all have several terms. Once I choose a region, country and industry and I get the results, the dropdowns in the widget only display a few terms, but not all of the terms for each taxonomy.

    The second scenario is when I only select a country, and don’t select anything from the rest of the taxonomies. Then, it returns my results, but in the widget all af the dropdowns dissappear except for the one that returned results. So, in this case, I’m left with just the Country dropdown. The rest is all gone.

    The third scenario is when my query returns no matches. Then ALL of the dropdowns are completly gone.

    I wonder what’s happening here, and how to prevent this.

    Idealy I want the plugin to allow to do a clean query and show all of the terms and all of the dropdowns at all times. So, that if there are no results, one can continue looking.

    Any ideas on what may be going on?

    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • p200


    The plugin shows only the items, which allow to narrow the search further. All other items are not displayed. So the plugin avoid “dead ends” for users when they are searching for something. I think thats the explanation for all scenarios.

    I don’t know if you can change the settings for an other behaviour.



    Thank you for your reply.

    Yes, I understand the way it works now. It a good way, as you say, not to have dead ends. Though, that is not the way I need it to work in my particular case.

    I also have the same issue. My client wants to show all product categories and if there are no results then show an enquiry form for the customer.

    Hiding taxonomies that are no used on published posts gives the impression that the website/company doesn’t ever have that product/page.

    If anyone is interested in this, I found a way to prevent this behaviour.

    Find these lines and comment them out as follows:

    private function get_terms( $tax ) {
    //if ( $this->all_terms )
    return get_terms( $tax );
    //return QMT_Terms::get( $tax );

    This of course would be overwritten should a new version of the plugin come out. That is why is never a good idea to change to core files of the plugin. But in case somebody really wants it.

    Thanks Liliana, this was useful for me as well.

    This helped me as well…

    private function get_terms( $tax ) {
    /* 		if ( $this->all_terms ) */
    			return get_terms( $tax );
    			return QMT_Terms::get( $tax );

    Thanks for the code above. I know it is probably a long shot but is there any way of stopping the drilldown effect on a specific taxonomy while leaving it active in others.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Plugin:[Query Multiple Taxonomies] Taxonomy dropdowns dissapear when no results’ is closed to new replies.