How To Display Post Excerpt In WordPress

Posted by


As a wordpress user you may need to show only a short excerpt of the post on blog homepage. This can be for a variety of reasons, ranging from attempting to increase page views to trying to make homepage more easily navigated and organized.

Another really popular place for using the post excerpt is to archive pages which helps to avoid being penalized for duplicate content by the search engine spiders.

If you need to switch some of your templates to show post excerpts then go to the template you want to make the change on and find this code:

< ?php the_content(); ?>

Replace with this code:

< ?php the_excerpt(); ?>

This will cause blog theme to display the first 55 words. If you need to add a link to allow readers to then click over and read the full post, in this case you can use this excerpt code:

<?php the_excerpt(__(‘Continue Reading This Entry’));?>

You can adjust words according to your requiement. If you need to display an excerpt longer than 55 words or want to display pictures and formating, in that case. you have two options:

Use the More tag – Once you have 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.
Optional Excerpt field – Paste the part of the post you 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 may notice that feed is only displaying partial posts. If you prefer the feed display the entire post but keep the partial post on your actual website, You need to use this plugin:

It will override this and have the feed display the entire post.


Shane G.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.