And/or statements in query_posts or wp_query
-
I’m a bit confused as to how to use and/or statements in query_posts to grab a combination of different post types and taxonomy types.
Let’s say that right now I have the following args set up for my query_posts:
$args=array(
‘post_type’ => ‘posts’,
‘cat’ => ‘featured’,
);I also want to add the following to my query..
$args=array(
‘post_type’ => ‘review’,
‘review_cat’ => ‘top’,
);How would I combine the two into my query, which would then include posts with the category of ‘featured’ as well as reviews with the review_cat (custom taxonomy) of ‘top’, while limiting the number of results to 3?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘And/or statements in query_posts or wp_query’ is closed to new replies.