displaying excluded posts with query_posts
-
On my home page I am using
query_posts('cat=-114,-115,-116,-117,-119&showposts=1');
to exclude posts from those categories. However I would like to be able to show a post from an excluded category if it is also in a category that is not excluded. I.e. if the post is in both category 2 and 114 I would like it to display on the home page. I had hoped that WordPress would do this by default but that does not seem to be the case.
In the codex on query_posts there is description of how to use an array with “category__in”, i.e.:
query_posts(array("category__in' => array(2,6)))
but I cannot figure out how to combine that with the multiple exclusions above. Is there a way to do this?
- The topic ‘displaying excluded posts with query_posts’ is closed to new replies.