How to Show Post Excerpt in WordPress

Tutorial about how to show post excerpt in WordPress. This guide will help you to get an overall idea about WordPress Excerpt, WordPress the_content function, read more link, WordPress the_excerpt function. Before that we are going through once with what is post excerpt or what does excerpt mean in WordPress and how to use post excerpt in WordPress for our beginners friend. Basically post excerpt define short type of summary from where we can get basic idea of a WordPress post or article. This is very simple and anyone can utilize this default feature with WordPress in their own blog and can generate WordPress read more link easily with the_excerpt function. Below we will show you an excerpt WordPress example using excerpt WordPress function the_excerpt and produce read more link. Basically WordPress post excerpt on page use for reduce load time along with more number of post display.

In WordPress we can use the_excerpt() function to achieve it also we can use excerpt post WordPress plugin to display post excerpt or read more link on front page WordPress or on WordPress homepage. But we recommended always if any features can be ready with few lines of custom code then please use it instead of using plugins. The reason is very simple increase number of plugins increase load time of page which can be produce a major impact in SEO. Default excerpt length is WordPress is 55 words. But with custom coding we can extend the excerpt limit.

Learn How To Show Post Excerpt in WordPress

How It Decrease Page Load Time

Basically if we are writing very long type post with more images then load time increase automatically due to lots of images. But in such situation WordPress offer a built in feature post excerpt and using this we can show or display a short description about the whole post. User can get idea about the post and if interested then click on read more and get the full post.

Show Post Excerpt in WordPress

Now we are going to learn how to create excerpt of a post and display. First we need to open the home page or index.php page and do some changes which discussed later in this post, where we want to display 5,6 post with excerpt. In this way we can show last created 6 post in a single page user can go with any one from this. Post excerpt look like the below image.

wordpress post excerpt

Now the question is how can achieve this in your own blog site. Very simple just open the above mentioned PHP file and find the line of code below.

// it shows the whole post content.

And change with

// it shows the wordpress post excerpt.
the_excerpt();//this is the built-in feature provided by wordpress and defined some exact number of words to display. 

Till now we learn how to use default built-in post excerpt feature in WordPress and if you don’t modify the default WordPress excerpt length then WordPress automatically take first 55 words from the post and display. Now we learn how to create custom excerpt word length of a post in WordPress. For that we need to add some code in our function.php. Here is a WordPress excerpt example where we want to show up to 80 words in WordPress post excerpt length.

// modify the excerpt length to 80
function modify_excerpt_length_to_80($length) {
return 80;
add_filter('excerpt_length', 'modify_excerpt_length_to_80');

// Changing excerpt more display at the end of the excerpt
function excerpt_read_more($more) {
return '...';
add_filter('excerpt_more', 'excerpt_read_more');

Now you achieve your goal and set to number of words show in post excerpt are 80. In this way you can display more post in a page with minimum load time. If you asking for real life scenario or example then you can go through once our index page, or any category page. Also you can check in any blog home page where bloggers use WordPress post excerpt and linked to the single page of that post.

Thanks for watching. Hope it will be helpful for the beginner’s and help them to get a clear idea about how to show post excerpt in WordPress and how to use. Share and like to support us.

Leave a Reply

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