Displaying the First Post Differently
Want the first post your main posts page to show some content but only display the heading links for the second and subsequent posts?
All you need to do is add a simple counter to The Loop in your theme’s index.php file and then use an if...else conditional to decide whether to display any post content.
A basic Loop looks like:
<?php if (have_posts()) :while (have_posts()) : the_post(); ?>
<div <?php post_class();?> id="post-<?php the_ID();?>">
<h2><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h2>
<!-- do the usual post stuff -->
</div>
<?php endwhile; endif; ?>
The amended Loop code would look something like:
<?php $count = 0;
if (have_posts()) :while (have_posts()) : the_post();
$count++;?>
<div <?php post_class($style);?> id="post-<?php the_ID();?>">
<h2><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h2>
<?php if( $count == 1 ) the_content();?>
</div>
<?php endwhile; endif; ?>
$count is our post counter which is initially set to zero. $count++; increments the count by 1 each time The Loop “loops”.
<?php if( $count == 1 ) the_content();?>
This line checks the current value of $count. If it’s set to 1, then the script outputs the post teaser (ie the bit before the <!--more--> tag. Otherwise it just moves on to output the next post title/link.
If you don’t want to use the <!--more--> tag, replace the_content(); with the_excerpt();

FlipFlop 3.0