Full Posts or Excerpts? How About Both?

Should you display full posts on your WordPress blog’s index, or excerpts? Normally I fall into the camp that says you shouldn’t display ten full posts on your main page, since you end up with more duplicate content, and it takes longer to scroll through the posts.

How about having the best of both options? Have one full post, and the rest can be excerpts.

To set this up, find the Loop in your theme’s index.php file. It should look something like this:

<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<small><?php the_time('F jS, Y') ?></small>
<div class="entry">
<?php the_content('Read the rest of this entry »'); ?>
</div>
<p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
</div>
<?php endwhile; ?>

Replace it with something more like this:

<?php $counter=0; while (have_posts()) : the_post(); $counter++; ?>
<div class="post" id="post-<?php the_ID(); ?>">
<?php if ($counter > 1) { echo getThumbnail($post->ID); } ?>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<small><?php the_time('F jS, Y') ?></small>
<div class="entry">
<?php
if ($counter < 2) {
the_content('Read the rest of this entry »');
} else {
the_excerpt('Read the rest of this entry »');
}
?>
</div>

It will display the first post in it’s entirely, and the remaining posts will be shown as excerpts. Note that you can still use the More Tag to override it and cut-off a particularly long post anyway.

If you don’t feel like messing with the Loop, you could use Daniel Scocco’s Homepage Excerpts plugin, which essentially does the same thing, while allowing for a bit of configuration, without having to play around with counter variables and conditional statements.