query_posts that only have a single category
-
Hey all. I have a custom post type “offers” that has a custom set of categories (taxonomy) set called “countries”. The categories are:
-Featured
-US
-Canada
-Mexico
-Europewhen a new “offer” is created the admin can check off a single country or several. If they check off “Featured” that offer will be shown on the homepage.
So…On my homepage, I have a bucket for each country. I’d like to search for a single post for each country but return results for offers that are ONLY for a single country and featured. if there are multiple countries checked off, I don’t want to show them on the homepage.
Similarly, On my “special offers” page, I have a tab for each country that lists current “offers” for that country. There’s also a tab for “Multiple Countries”. In the multiple countries tab I’d like to show only offers that have more than one country selected.
I’m at a loss as to how to do this. Perhaps I’m over thinking it. Any help is greatly appreciated
- The topic ‘query_posts that only have a single category’ is closed to new replies.