WordPress.org

Ready to get started?Download WordPress

Forums

Query Multiple Taxonomies
[resolved] How to query multiple taxo's (10 posts)

  1. nowton
    Member
    Posted 2 years ago #

    It might be a dumb question but so far I've managed to create taxonomy views and put several taxo-selecting widgets in its sidebar. But: how do I select items which have several different taxo's in common, and show them? In the current solution, clicking a taxonomy just takes me to the page showing the result for that one taxonomy.

    I'd like to be able to filter results for items that meet all taxonomies/criteria. Anyone?

  2. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    You select all the taxonomies in a single widget.

  3. nowton
    Member
    Posted 2 years ago #

    How would I go about that? I can only select one taxonomy at a time in the widget.

  4. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    Maybe you're using the wrong widget. The QMT widget has checkboxes:

    http://s.wordpress.org/extend/plugins/query-multiple-taxonomies/screenshot-2.png?r=434619

  5. nowton
    Member
    Posted 2 years ago #

    That looks different indeed, so I tried it. The widget shows up alright, however I cannot get it to display empty taxo's. I cannot get it to exclude certain categories either. Am I overlooking something?

  6. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, empty taxonomies aren'd displayed by default (what's the point?) and no, you can't exclude certain categories currently.

  7. nowton
    Member
    Posted 2 years ago #

    OK, thanks for making that clear. In my case I'll resort to using taxonomies instead of categories for specific product types.

  8. fhkurdi
    Member
    Posted 2 years ago #

    @scribu
    I am struggling with the same problem regarding the check box issue. I think a more accurate way to describe the problem is the Empty taxonomies problem. If you have 3 states for each category(taxonomy) link (Selected, Included, Excluded), the website users will have a clearer view of what this widget is actually doing. So if the "Empty" taxonomies are dimmed out (css class or id) you would have the functionality of the check box.

    I would like to contribute and add this option, but im not sure where to start. Where exactly does the filtration of the taxonomy list occur in the plugin?

  9. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    In the widget admin, there are only two states per taxonomy:

    * don't show the taxonomy
    * show the taxonomy (if it has terms)

    I'm not really sure what you're proposing.

    Also, I believe you're confusing 'taxonomy' with 'term'.

  10. fhkurdi
    Member
    Posted 2 years ago #

    what im proposing is a modification on the "list" option.

    The modifications are as follows:
    - change the output of the list to include all taxonomies (not sure im using the right term, lets say for my Video custom-post, i have the taxonomy Category, and i want to include all the category items... being entertainment, funny, news .....ext)

    - change the html output to include the class or id of "excluded". This is for those category items that are empty. I would like to have the option to list the empty category items differently(dimmed out, or disabled). can this be done with the mustache template?

    this way, we would have the checkbox functionality. This could of course result in 404 errors, because the user can select an empty category (if the links are not disabled).

    Thanks for the help.
    Much appreciated.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic