This post is being submitted as part of the tutorial blog writing project over at Daily Blog Tips. If you are interested in participating, all tutorials must be submitted by midnight of January 27th, 2008.
Depending on the type of blog you run, you may at some point have an interest in only showing only a short excerpt of a post on your blog’s homepage. This could be for a variety of reasons, ranging from attempting to increase page views to trying to make your homepage more easily navigated and organized.
Another really popular place for using the post excerpt is for your archive pages, which helps you to avoid being penalized for duplicate content by the search engine spiders.
No matter what the reason is, if you are interested in switching some of your templates to show post excerpts, it isn’t very difficult to do. Go to the template you want to make the change on and find the following code:
< ?php the_content(); ?>
Depending on your theme, it may include something in the parenthesis. Change this code to the following:
< ?php the_excerpt(); ?>
This will cause your blog theme to only display the first 55 words (and strip pictures/formatting). If you’d like to add a link to allow readers to then click over and read the full post, you can instead use something like the following excerpt code:
<?php the_excerpt(__(’Continue Reading This Entry’));?>
You can of course adjust the wording to fit your personal needs.
If you’d prefer to show an excerpt longer than 55 words, or want to display your pictures and formating, you’ll have to do a little manual work. You currently have two choices:
- Use the More tag - Once you’ve written your post, you can switch over to Code view in your WordPress Write panel, click where you want the excerpt to stop and click the More button. (See the screenshot above)
- Optional Excerpt field - Paste the part of the post you’d like to display as an excerpt in this field of your WordPress Write panel. It should correctly display everything in the excerpt including links and specific formating.
If you use either of these methods, you’ll notice that your feed is only displaying partial posts. If you’d prefer to have the feed display the entire post, but keep the partial post on your actual website, I recommend using the Full Text RSS Feed WordPress plugin to override this and have the feed display the entire post.
Questions? Let me know in the comments below.




Sunday, July 20th, 2008 at 8:22 am
It doesn’t work in single pages. is there any way to show only the excerpt in single post pages?
Tuesday, July 22nd, 2008 at 10:19 pm
I am a newbie and do not understand php at all. I have installed Bas Van Doren’s advanced excerpt plugin (http://sparepencil.com/archives/2007/08/21/advanced-excerpt-plugin-for-wordpress/), activated it and it does not seem to work as all my post contents seem not to show on my website except the post title.
I am very sorry. I do not understand how to get it right because I do not get to know what to change manually at the template back end especially the php lingo.
Kindly teach me step by step. Thanks
Monday, September 8th, 2008 at 3:22 pm
One can change content () to excerpt () only if one is allowed to edit the theme, which I believe is possible only on a hosted blog and not a wordpress.com blog.
Friday, December 12th, 2008 at 10:23 am
In which page I can find ..Like in single.php or header.php?
Tuesday, May 5th, 2009 at 11:19 pm
wow! It’s that simple? I’ve been trying to search the codes in the wordpress theme for this. Newbie as I am, of course, I gave up about 3 seconds after I lost my patience. Thanks, I’ll give it another try, now that I know what to look for.
Thursday, June 18th, 2009 at 8:21 am
Thanks! I was actually looking for a way to do the opposite because I wanted a list of YouTube videos to show. Now I’m using the tag to manually control how much is in the excerpt.
Cio,
-Jim
Trackbacks/Pingbacks
Leave A Comment
Become one of our
Featured Sites
Recent Trackbacks
Contributing Authors
Archives
Extras
WordPress Hacks Copyright © 2007-2009 | An Apricot Media Website
Template by StudioPress | Custom Design by Kyle Eslick and Blog Design Studio
RSS Feed Email RSS