Exclude latest post in a category from showing up in the loop?
-
Is that possible?
I’ve made it so the latest post from “misc” and the latest post from “selfdefense” are in 2 boxes in my header, with this:
<?php if (have_posts()) : ?> <?php $my_query = new WP_Query('category_name=misc&posts_per_page=1'); while ($my_query->have_posts()) : $my_query->the_post(); ?> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <?php the_content('Read the rest of this entry »'); ?> <?php endwhile; endif; ?>
then repeat that code, using category_name=selfdefense instead.
OK, so then, below that, I don’t want the loop with all the rest of the posts to show those 2 latest from those categories, but I DO want to see the 2nd to latest, and so on, from those categories, as normal.
What can put in the loop to make it exclude just those 2 latest posts from those categories?
Thanks in advance!
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Exclude latest post in a category from showing up in the loop?’ is closed to new replies.