Custom taxonomy and query_posts
-
Hi,
I’m playing with custom taxonomies – and would like to query posts which have a taxonomy value assigned to them… But it seems WordPress doesn’t take care of the condition and returns all posts.The way I have defined my taxonomy:
register_taxonomy( ‘officialAlbums’, ‘album’, array( ‘hierarchical’ => false, ‘label’ => ‘Official Albums’, ‘query_var’ => true, ‘rewrite’ => true ) );
The way I’m querying WordPress:
query_posts( array( ‘post_type’ => ‘album’, ‘officialAlbums’ => ‘xxx’, ‘posts_per_page’ => 10 ) );
Even if I have two articles tagged with ‘officialAlbums=xxx’, WordPress ignores the ‘officialAlbums’ parameter.
Could you figure what I’m doing wrong?
Thanks,
Nicolas
- The topic ‘Custom taxonomy and query_posts’ is closed to new replies.