How to change full post display to excerpt in WordPress

To change the way WordPress displays entries, going from full text to an excerpt, you need to edit the system template files. In particular, you need to edit the homepage and archives templates because these are the two places (aside from the actual entry page) where posts are displayed.

As an alternative, you could always just fill out the “Excerpt” spot on the wordpress “Edit Post” page where you create entries if you want to control exactly how much text is shown and what it will look like but that’s a lot of extra manual work. For this reason I prefer to let WordPress automatically choose where to cut off entries using the following steps and code changes.

  1. open the indext.php and archive.php files by going to Appearance > Editor in your WordPress system
  2. find the code <?php the_content('Read the rest of this entry »'); ?>
  3. replace it with <?php the_excerpt(); ?>
  4. you can also add something like <a href="<?php the_permalink(); ?>" title="Read the rest of <?php the_title(); ?>" class="more-link">Read the rest of this entry »</a> just after the excerpt code to make it more useful for readers

Note that depending on your website host, you might need to edit the permissions of your your template files before being able to edit them inside of WordPress. You will need to make them writable with permissions 666.

One comment

  1. Thanks, this really cleans up the homepage of my site. I hate having to use the manual excerpt thing so this is perfect!