
photo credit: adria.richards
The first question is why? Most wordpress templates display full content posts on the front page, making the main page of your blog have a lot of scrolling and only reveal a very limited amount of content to a first time visitor without lots of scrolling. Additionally for SEO (search engine optimization) it’s a good thing to reduce the amount of duplicated content (same content word for word as located in other areas). Here is a previous article I’ve written on how to identify and fix common SEO problems in wordpress.
Before I go into the details of using excerpts in place of the entire post content, I want to discuss one alternative that gives most of the advantages of excerpts without changing the core templates. You can use the more tag in the editor to split posts where you want them. This will give the reader a link to read more about the blog post. It will also let you make the more interesting or hot posts show longer previews while keeping others extremely short.
In my person blogs I use a multi-column theme which uses both full content in one column where I use the more tag and other columns which use the excerpt. I do this so that the first time visitor can get a good preview of the different type of content available on the site and click on what entices them. If you’ve imported tons of content from another blog or site that doesn’t have more tags, it can be a lot easier to change to excerpts on your blog instead of having to edit each of those posts.
The default excerpt tag – by default the excerpt will only show the first 55 words of a posts content. This will give a nice little lead in and ask the visitor to click to read more. By default the images and html code are stripped out. There are however many plugins available which will expand the excerpts to include images and html markup and will let you specify a custom word or character length.
I’ll discuss these in a followup post, but for now here are a few links to plugins that will expand and improve the functionality of the excerpt function in your wordpress blog: Wordpress Advanced Excerpt, Excerpt Editor, Thumbnail for Excerpts, and TinyMCE Excerpt.
For now I’ll go over what you need to know in order to change your wordpress theme to use the default excerpt. Later on you can start installing and playing with plug-ins that increase functionality.
Step 1 – Backup your theme – incase you make any mistakes it’s important to back it all up. There are many ways to do this, the easiest is via FTP. Specific instructions are beyond the scope of this post.
Step 2 – Load the theme editor in Wordpress 2.X it’s under Design >> Theme Editor
Step 3 – Edit the template you want (probably the main index to start with). Under ‘Theme Files’ on the right click “Main Index Template”
Step 4 – Find ‘<?php the_content(); ?>' in the Theme Editor window showing the html code from main index template.
Step 5 - Change ‘<?php the_content(); ?>' to ‘<?php the_excerpt(); ?>'
Step 6 – Click “update file” and you’re done. Repeat the steps for each template file (category, archives etc) that you would like to change the full content tags to excerpts.
I’m going to be blogging a lot more on wordpress tips, tricks, and easy to follow how to’s so stay tuned. We’ll be dong a lot more with excerpts.









One thing to watch out for is that the_excerpt () does not include a link to the full post as the_content () does when showing a teaser. You would need to add something like:
<a href="”>Read the rest …
You could also add a class to the tag and style it in the style.css file for the template if you want the link to look different than other links.
Looks like I forgot to escape my html example — lets try again!
<?php the_extract (); > <a href=”<?php the_permalink (); ?>”>Read the rest …</a>
Hopefully I got all the < and > symbols right.