Cut Out People
Photo by Linek
There are many reasons to choose to publish either full posts or excerpts on the homepage. Full posts are very simple to implement. You simply write, then publish. However, if you have chosen only partial posts, then WordPress users have two different methods which will achieve the same effect.

Method 1: The More Tag

This method is usually the easiest of the two. When you have written your post, select where you would like to make the cut-off between the partial post for the homepage, and the rest of the page, then click the More button (More).

Your homepage, and category pages, will now display only the first section of the post, and a line of text linking to the rest of the article. This line defaults to, “Read the rest of this entry »”, but can be easily changed. Open your index.php template file, and change the following line: (Make sure you retain the quotation marks!)

<?php the_content('Read the rest of this entry »'); ?>

Method 2: Post Excerpts Function

To use the post excerpts function, you will need to edit your template’s files, namely those controlling your home and category pages (These will be home.php and category.php if you have them, and index.php if you don’t). First off, replace the following line:

<?php the_content('Read the rest of this entry »'); ?>


<?php the_excerpt(); ?>

Your pages will now show the excerpt. However, to load the post, your readers will have to click the post title. This isn’t optimal (Why force your readers to scroll back upwards, to continue reading onwards?) . To solve this, we will add a link below the content, which can be used to load the rest of the article, similar to the one generated by the <!–more–> tag. Beneath the line we just edited, add the following:

<a href="<?php the_permalink(); ?>" title="Read the rest of <?php the_title(); ?>" class="more-link">Read the rest of this entry »</a>

It would also be recommended that you customise the text.

By default, WordPress will now show the first 55 words of your post. You can change this however, by pasting what you want to be shown into the “Optional Excerpt” box in the Write Post screen. This box understands code, so if you intend upon including images in the excerpt, then you can copy and paste directly from the Code View on the Write Post page.

Through using this method, you can choose to display different text on the homepage than what is in the article. For instance, you may want to write a summary of the article to come, not merely quote the introduction. Another use is that if you choose to split the excerpt from the post in the middle of a list, you can add the </ul> tag to the excerpt, to ensure your homepage continues to validate (Not overly important by any means, but it is nice to do).

Both of These Methods Will Publish a Partial RSS Feed

Sadly, WordPress does not natively support the feature of allowing you to continue publishing full-text feeds, when you use either of these methods. However, you can get around this by installing Ronald Heft’s Full Text RSS feed plugin.

And yes, this does mean that Pro Blog Design is returning to full-text feeds! Apologies for sending out partial feeds for the past week or so.

Enjoy this post? You should follow me on Twitter!