I’m trying to add a condition to a query string and am striking out. I’ve read through the support docs several times and am either just missing the answer or am too inexperienced to see it.
This is my current string:
<?php $recent = new WP_Query( 'cat=7,316&posts_per_page=10' ); ?>
And what I want to do is also include posts from a certain tag, so I tried adding
But I realize this is probably saying “give me all posts with a cat id of 7 AND a tag id of 7, and what I want is cat 7 OR tag 7.
I think one easy answer here is to just use create and include a third category, but I am trying to include these post headlines in a specific spot on the homepage without them showing up on a separate category archive page.
- The topic ‘Looking for WP_Query help’ is closed to new replies.