Exclude first recent post
-
Hello again! π
This time.. I’m trying something more advanced. On my homepage I’m listing excerpt posts and I’m trying to exclude the first post.
This reason for this is that I’m using a template tag query post:
query_posts('posts_per_page=5');to show the most recent post as content and I won’t be needing it to reappear as excerpt.
Is there any way to make this happen?
I found this code that excludes a certain post but maybe there’s something I can put in for the first post only..?
<?php if (have_posts()) : while (have_posts()) : the_post(); if( $post->ID == '179' ) continue; ?> <?php the_content();?> <?php endwhile;endif;?>and I also found this code for the first post
<?php if ($post != 'set') { echo 'firstPost'; $post='set'; } ?>but I just don;t know how to attach them all π
The topic ‘Exclude first recent post’ is closed to new replies.