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

I'm running a WP 3.0.5 website and here is my problem: I define a custom post type with 2 custom taxonomies and I've got to develop a search engine based upon these taxonomies. Until there, no problem :

$args = array(
         'my_post_type' => 'post_type_name',
         'my_taxo_1' => 'taxo-1-slug',
         'my_taxo_2' => 'taxo-2-slug'

query_posts( $args );

Working like a charm! But... What I want is to retrieve only custom posts matching both taxonomies whereas here, only 1 is sufficient.

I saw WP 3.1 is introducing a new way dealing with taxonomies (http://codex.wordpress.org/Function_Reference/query_posts#Taxonomy_Parameters) which will absolutely solve my problem but WP 3.1 is still in beta and I can't take risk for my customer.

Thanks for your help !

share|improve this question
You're way in the future, 4.0.5, I think you're talking about 3.0.5 ;) – hakre Feb 11 '11 at 15:02
It seems I need rest ;) – Kaaviar Feb 11 '11 at 15:12
up vote 2 down vote accepted

You can do this in 3.0 with the Query Multiple Taxonomies plugin.

share|improve this answer
Thanks for the answer. I think this will do the trick ! – Kaaviar Feb 11 '11 at 15:15

Hi @Kaaviar:

Your question is basically the same as this question:

share|improve this answer
In that case, we should vote to close it as a duplicate. I know you have the moderator-vote-of-death, but I think this is so clear that you don't have to wait for others to get to five votes. – Jan Fabry Feb 11 '11 at 15:08
You're actually right. I didn't find this one. Thanks. – Kaaviar Feb 11 '11 at 15:13
@Jan Fabry - I'm not a huge fan of closing duplicates but they different questions tend to have different titles and different text those they SEO differently. I also think the concept of "duplicates" is subjective and see that some "duplicates" get closed and others don't. Cross-referenced "duplicates" can also provide more context for a question. Basically I don't think that is a good rule of StackExchange so I let others close duplicates if they really want to. – MikeSchinkel Feb 11 '11 at 15:15
But when you close this question as a duplicate, the question will still exist, only it will have a clear link to the "reference" question. And more important: if there are multiple solutions for a problem, they will all appear as answers on one question page, and not be spread out over multiple questions. Now your answer and link will not be at the top of this page, because my answer (which is not always the best, depending on the situation) appears above it. But I guess this should be a Meta discussion if we want to continue it. – Jan Fabry Feb 11 '11 at 15:26
@Jan Fabry - If you feel this is an important enough issue to devote time to then by all means take to meta. – MikeSchinkel Feb 11 '11 at 15:37

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.