Advanced Taxonomy Query
-
Hi!
I’m trying to get my WP_Query to present the right set of posts, something must be wrong in my arguments since all kinds of posts get presented. Anyone with skills in taxonomy queries?
Basicly I have this:
$myquery = new WP_Query($args);
a print_r($args) gives the following output:Array ( [post_type] => Array ( [0] => myposttype ) [posts_per_page] => 16 [paged] => 1 [meta_key] => startDate [orderby] => meta_value [order] => DESC [tax_query] => Array ( [0] => Array ( [relation] => AND ) [1] => Array ( [taxonomy] => category [field] => id [terms] => Array ( [0] => 307 ) [operator] => NOT IN ) [2] => Array ( [taxonomy] => team [field] => id [terms] => Array ( [0] => 63 ) ) ) )
I would like to list custom posts (myposttype) with a certain taxonomy “team” id = 63 and exclude all posts from category “307”…
Did I append the different arguments wrong? Or this is not possible?
Thanks for your help!
//Mike
- The topic ‘Advanced Taxonomy Query’ is closed to new replies.