WP 3.0.5 – Custom posts matching 2 taxonomies

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.

Read More

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 !

Related posts

Leave a Reply

2 comments