Query Multiple Taxonomies
[resolved] Checkbox URL Issue (6 posts)

  1. reagantrose
    Posted 2 years ago #

    I'm using QMT and it works great. However, when using checkbox mode the URL it spits out is very awkward.

    When using dropdowns, it displays very nicely in all browsers,

    But checkboxes displays the same url as,
    Firefox: http://www.nsw4.biz/opportunities/?qmt[countries][]=49
    Chrome: http://www.nsw4.biz/opportunities/?qmt%5Bcountries%5D%5B%5D=49

    Am I doing something wrong here? Or could you please point me in the right direction on how to rewrite that url so it displays morel like the dropdowns one does.


    Here's my development site so you can see for yourself:


  2. scribu
    Plugin Author

    Posted 2 years ago #

    That's just how the data in HTML checkboxes gets serialized into a URL; there's nothing wrong with it.

    It's more complex than dropdowns because with checkboxes you can choose multiple terms in the same taxonomy.

  3. reagantrose
    Posted 2 years ago #

    Ok, gotcha. I didn't realize that.

    Thanks for your quick reply!

  4. jbireland
    Posted 2 years ago #

    Hi reagantrose,

    I just checked the linke to your site and you seem to have solved what I'm trying to achieve.

    In your filter opportunities sidebar, how did you manage to stack three drop downs that filter?

    I would really appreciate any help.



  5. reagantrose
    Posted 2 years ago #

    Hey jbireland,

    Sorry for the late response. It's pretty straight forward. You just select all the taxonomies you want to use under the appearance/widgets menu when you are setting up your Taxonomy Drill-Down widget. Select dropdown for mode and then check the boxes next to all the taxonomies you want to filter by. Then all those drop downs should just show up on the page for you.

    You need to make sure the taxonomies you are selecting are relevant to the post-type you are filtering. For example, I have a custom post-type called 'opportunities' and I have registered 3 custom taxonomies to that post-type, 'terms', 'ministries', and 'countries'. So those are the three I select when I set up the widget.

    Hope that's helpful to you.


  6. summerofandy
    Posted 2 years ago #

    Let me first say, that the QMT plugin is probably one of the most useful plugins I've ever installed! I'm so glad I stumbled upon it a month ago...

    I guess if there is no way to change the urls that are generated from the checkbox queries, then I have another issue...

    On one of my sites I use both the dropdown mode and checkbox mode... a user can search using the dropdowns and then once the results are displayed they can expand/filter using the checkbox mode.

    The issue I have is that I end up with duplicate content on different urls like this:

    Both of these urls would actually be the same query and content, just generated using different modes. This of course only happens if the user selects one term from each taxonomy (in checkbox mode), but it's a possibility.

    I guess my only options are:
    1. Not use both checkbox and dropdown modes on my site
    2. Figure out how to redirect all of the query strings that could create duplicate content to the other query string url

    I would like to keep both modes, so if anyone knows anything about redirecting query strings (especially urls that include "[]") let me know. The brackets seem to be what is causing me the most issues...


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Query Multiple Taxonomies
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic