Displaying Excerpts on Your Main Blog Post Page in WordPress

WordPress

You are a conscientious WordPress website owner, making sure you get the most out of your SEO opportunities by posting a blog every day. But you recently made a discovery: your main blog post page displays only your most recent post in its entirety instead of a list of multiple posts with small excerpts from each. That needs to change.

Like so many others, you want your readers to see excerpts on your main page so that they can choose from a list of your last 5 to 10 posts without having to wade through a ton of links. Well, there’s good news. Displaying excerpts on your main page rather than full posts is easy. There are two ways to do it, as explained below.

Apply the ‘More’ Tag

The easiest way to make sure your main blog post page displays excerpts is to apply the ‘More’ tag whenever writing a new post. Doing so could not be simpler. Assuming you are using the WYSIWYG editor to compose a new post, look along the top menu for an icon that resembles a road with a dividing line down the middle. That icon applies the ‘More’ tag when you click it. Simply place your cursor where you want your excerpt to end and click the button. That’s all.

After your post is published, you should see an excerpt appearing on your main blog post page with a button underneath people can click if they wish to read the entire thing. Applying the ‘More’ tag is the best way to accomplish this task if you are the only one posting. If you work with multiple posters who may not be dependable enough to apply the tag on a regular basis, you can make a change in one of your templates that will automatically create excerpts whether your posters use the tag or not.

Applying the Coding Change

Applying the coding change creates a universal excerpt for all your posts regardless of whether individual posters use the ‘More’ tag. By default, the excerpt will be 55 words long; you can choose to include a ‘Read More’ link or just let readers click on the title to navigate to the full text.

In order to make this work, you need to know which template your theme uses as a default for your blog posts. In most cases, it will be named ‘content-home’ or something similar. In that file, replace ‘the-content ()‘ template tag with ‘the_excerpt ()‘. Save the file and you are done.

Doing just this much will create excerpts on your main blog post page without the ‘Read More’ links. If you want to add the link, open up the functions.php file using the built-in WordPress editor and add the following code:

function new_excerpt_more( $more ) {
return ' <a class="read-more" href="'. get_permalink( get_the_ID() ) . '">' . __('Read More', 'your-text-domain') . '</a>';
}
add_filter( 'excerpt_more', 'new_excerpt_more' );

Save the file and you are done. You should now see excerpts with links on your main blog post page instead of full content.

Share it!Share on FacebookTweet about this on TwitterShare on Google+Email this to someone

Our Recommended Wordpress Web Hosting Provider

WordPress

WHC.CA
Get a 50% Discount by using our link.

WHC.ca

Reliable host, with excellent customer service and an easy one-click Wordpress installation. Our recommendation to host a Wordpress blog.

Leave a Reply

Your email address will not be published. Required fields are marked *