WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I filter the posts by multiple categories? For example, if some of my posts are categorized under just apples and some as just oranges and some both, how would I filter the results to show only posts marked under both apples and oranges?

In other words, I don't want the results to list all posts under apples and all posts under oranges. I only want to show posts listed under both apples and oranges. Is there a way to do this?

share|improve this question
Search inside multi-taxonomy-query. – kaiser Apr 15 '12 at 19:08

Wordpress does this automatically if you do

http://yoursite.com/?cat=1+2 (where 1 and 2 is category ids)


http://yoursite.com/?category_name=apples+oranges (where apples and oranges is the slugs)

OR something like


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.