Exclude most recent posts from only 1 category
-
Hi guys,
This is my problem. On a page I to want to return posts from all categories.That is easy enough.
But I want to exclude the 4 most recent posts from category with id ’15’.
I am not sure how to go about this.
This is what I have:
<?php $loop = new WP_Query ( array( 'post_type' => 'sport', 'cat' => '-15', 'posts_per_page' => 10 ) ); while ( $loop->have_posts() ) : $loop->the_post(); ?>
This of course excludes all of category 15!
I have experimented with the ‘offset’ parameter, but with no success.
Can anybody help? Thanks.
James
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Exclude most recent posts from only 1 category’ is closed to new replies.