Forums

[resolved] Is it possible to only display posts that have multiple categories selected? (3 posts)

  1. shagen
    Member
    Posted 1 year ago #

    Trying to understand if it possible to display a post that has multiple categories selected for it it. Here is an example.

    Trying to build a filtering system. Drop-down A(DD-A) has one set of categories and Drop-down B has a different set.

    When selecting option 1 from DD-A it would show all post within that category. Same for DD-B. When selecting an option from each drop down I would like the loop to spit out only the posts that have been checked with both those categories.

    Currently I can only get it to return a everything from the selected options added together vs. only the posts that have both categories selected.

    Hopefully I am making sense. I am using Ajax to return all this back on the same page dynamically on the fly so that complicates things a bit but wanted to get an idea if it is even possible before I expand on the other issues I am having.

    Any suggestions would be greatly appreciated. Thanks for the time as always.

  2. alchymyth
    The Sweeper
    Posted 1 year ago #

  3. shagen
    Member
    Posted 1 year ago #

    Thanks for the Codex reference. I had in fact looked over that page already and it was not working properly for me but I reviewed it on your suggestion just to be sure. However I did end up searching 'category__and' not working in Google and came across this post which ultimately solved my problem...

    http://wordpress.org/support/topic/category_and-not-working-after-31-update

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags