WordPress excerpts are short summaries of your posts that appear on your homepage, archives, and search results. Customizing them can improve the appearance of your site and boost user engagement.
Plus, with the right tools, you can modify excerpts without any coding skills.
This guide will show you how to customize these excerpts easily to better suit your site’s style and needs.
Video Tutorial
If you prefer written instructions, then just keep reading.
When and Why You Should Use Excerpts in WordPress
First, let’s talk about when it makes sense to use excerpts and why it’s a good idea to do so.
By default, WordPress shows full posts on your home page, blog page, and archives of your site.
However, our experience has shown that this makes a WordPress website slower, and it can also cause issues with search engines because it means you will have duplicate content on your site.
Using excerpts will make your pages load faster because you will only be loading a small part of each article. You may want to use excerpts on:
- Your website’s homepage, if it displays blog posts.
- Your various archive pages for categories and tags.
- Your blog post page, if you have a static home page.
Many WordPress themes are configured to use excerpts by default in places like your home page. With premium WordPress themes, you may have the option to choose whether you want to display full posts or excerpts.
For more details, see our article on full posts vs. excerpts for more reasons to use excerpts.
Why You May Want to Customize Your Excerpts
If your WordPress theme uses excerpts by default, then WordPress will automatically generate an excerpt for you.
By default, WordPress uses the first 55 words of your post, though many themes will show a little more.
So what’s wrong with that? Can’t you just save time by letting WordPress come up with the excerpt for you?
In our experience, this doesn’t work well for most websites.
The auto-generated excerpt will begin with whatever text is at the start of your post. This can be fine in some cases, but it doesn’t work so well if you have anything before you start your post’s introduction.
Here’s an example from a site using the Ribosome theme:
As you can see, the excerpt shows the text from the very start of the post. This includes the featured image credit plus a note about when the post was most recently updated. This does not look very good.
If your theme does not handle excerpts very well, you may want to customize them to make them easier to read and help you get more clicks for posts.
That being said, let’s look at different ways to customize excerpts in WordPress. You can use the following links to jump to whichever method you want:
1. How to Add a Custom Excerpt in WordPress (Default)
Adding a custom excerpt in WordPress is quite simple. First, you need to create a new post or edit an existing one.
In the right-hand panel of the WordPress content editor, you should see the ‘Excerpt’ dropdown. Click the downward arrow next to it.
It will expand to show the excerpt box.
You can type your custom post excerpt here. We simply copied the first paragraph of our post itself.
Note: If you are still using the old classic editor, you need to click the ‘Screen Options’ tab in the top right corner. Then, put a check in the ‘Excerpt’ box. You will now see a space for your excerpt below the box where you write your post.
Your WordPress theme will now use the custom excerpt for this post.
As you can see, the Read More link is not displayed after the excerpt. Depending on the theme you use, custom excerpts may not have this link.
The reader can still click on the post title or the post’s featured image to read your full post.
2. Changing Excerpt Length
If you want to change the length of excerpts on your site, you can use the free WPCode plugin. It is not only the easiest and safest way to add custom code to your site, but it also comes with a large library of pre-configured code snippets.
We will be using one of these built-in snippets today.
To begin, you need to install and activate WPCode. For more details, you can check out our step-by-step guide on how to install a WordPress plugin.
Once activated, you can go to Code Snippets » Add Snippet in your WordPress admin panel and search for ‘excerpt.’
Hover your mouse over the result titled ‘Change Excerpt Length’ and click the ‘Use Snippet’ button.
The plugin will then insert the following code snippet for you:
add_filter(
'excerpt_length',
function ( $length ) {
// Number of words to display in the excerpt.
return 40;
},
500
);
After that, you will see the ‘Edit Snippet’ screen. WPCode has already pre-configured all the settings for you.
By default, this snippet will limit the excerpt to 40 words. You can adjust the number on Line 5 to whatever works best for your WordPress blog.
Once you have set the length of the excerpt that you want, you just have to toggle the switch to ‘Active’ and click the ‘Update’ button.
Now, when you visit your site, the shortened excerpts will be wherever your theme shows them.
Below is an example of what it would look like using the Twenty Twenty-Two theme and setting the WPCode snippet to display 5 words.
Note that the snippet from WPCode only works with the default excerpts that WordPress generates.
Changing the Length of Custom Excerpts
If you want to change the length of custom excerpts, you will need to add a separate, custom snippet into WPCode. It’s very easy to copy and paste code snippets into WordPress, and since we are using WPCode, doing so follows many of the same steps as above.
First, navigate to Code Snippets » Add Snippet. Just hover your mouse over ‘Add Your Custom Code (New Snippet)’ and click on the ‘Use Snippet’ button.
Next, you see the ‘Create Custom Snippet’ page.
You will now need to give your new snippet a title and then paste the following code into the ‘Code Preview’ field:
add_filter( 'get_the_excerpt', function( $excerpt, $post ) {
$excerpt_length = 40; // Change excerpt length
$excerpt_more = '...<br><br><a href="' . get_permalink($post->ID) . '">Read More »</a>'; // Add ellipsis and 'Read More' permalink text when trimmed
if ( has_excerpt( $post ) ) {
$excerpt = wp_trim_words( $excerpt, $excerpt_length, $excerpt_more );
}
return $excerpt;
}, 10, 2 );
You can change the value for $excerpt_length
on Line 3 to choose how many words your custom excerpt will be.
Additionally, editing the text highlighted below on Line 4 will change the anchor text for the Read More link when the excerpt is trimmed.
When you have customized the snippet to your needs, make sure the ‘Code Type’ is set to ‘PHP Snippet.”
Then, you can go ahead and toggle the switch to ‘Active’ and click the ‘Save Snippet’ button.
Now, when you visit your site, you will see that your custom excerpts are shortened to the length you chose on Line 3.
3. Changing Read More Text for Excerpts
In addition to the snippet above, you can also use the WPCode snippet library to change the ‘Read More’ text that appears with excerpts in most themes.
Just install and activate the free WPCode plugin. For more information, you can follow our step-by-step guide on how to install a WordPress plugin.
Once activated, you can go to Code Snippets » Add Snippet in your admin panel. From there, just search for ‘excerpt’ and hover your mouse over the result titled ‘Change Read More Text for Excerpts.’
You can click the ‘Use Snippet’ button to go to the ‘Edit Snippet’ page. WPCode has already pre-configured the code snippet for you and, by default, is set to say, ‘Read the whole post.’
However, you can replace the text on Line 4 with anything you want.
Whenever you are happy with your new text, just toggle the switch to ‘Active’ and click the ‘Update’ button.
4. Displaying Excerpts in Your Theme
Most popular WordPress themes come with built-in support to display custom excerpts on your posts.
However, some themes may not have excerpt support. If that’s the case for yours, then you will need to manually modify your theme templates.
Adding Post Excerpt in Block Themes
If you are using a block theme, then you can go to the Appearance » Editor page to edit your theme in the Site Editor.
This will open the site editor. Click on the template you want to edit from the left sidebar or simply point at the area where your posts are displayed.
The full site editor can display your latest posts using the Query Loop block, which is the standard way to display a list of posts.
After adding the Query loop block, you need to click on the ‘Choose’ button to select a pattern.
WordPress includes several layouts as patterns for the Query Loop, you can choose from grid, table, list, and more.
The generated post template will now automatically display your post excerpt.
However, the only thing you can change here is the read more text.
Adding Post Excerpt in Classic Themes
If you are using a classic theme, then you can add a post excerpt by creating a child theme and adding some code.
This adds some complexity to the process, and if you are uncomfortable with that, then you can use method 3 in this article, which does not require you to add any code.
In your child theme, you will need the template used to display the pages you want to modify. See our guide to WordPress template hierarchy to figure out which template you need to edit.
The filenames will differ slightly depending on your theme, but you are likely looking for home.php, content.php, archive.php, and category.php.
In each of these files, you will need to find this line:
<?php the_content(); ?>
Next, you will need to replace it with the_excerpt tag like this:
<?php the_excerpt(); ?>
Important: We don’t recommend this method for beginners. Even if you are quite experienced with WordPress, you might want to avoid creating a child theme and editing your template files.
The next two methods are great alternatives.
5. Showing the Start of Your Posts With the More Tag
Another way to create a short version of your post for your WordPress homepage and archive pages is by using the ‘More’ tag.
This works a bit differently from an excerpt. Instead of creating a text-only snippet of your post, the More tag lets you break off your post at a certain point.
This means only the first part of your post (up to the tag) will show in the list of posts on your homepage, categories page, and so on. The benefit of the More tag is that it keeps all your formatting.
At the point where you place the More tag, WordPress will show a ‘Read More’ link. Readers can click on this to go to your whole post. They will be automatically jumped to the right point in the post, too.
To create a More tag, create a new post or edit an existing one.
Next, you need to add a block where you want the More tag to go. Select the More block from the Layout Options section or search for it using the search bar.
This is how the More tag will appear inside the content editor.
Optionally, you can choose to hide the content before the More tag on the actual post.
Note: You can also add a More tag in the old classic editor. Click where you want to place the tag in your post itself, then click the More button in the visual toolbar.
Virtually every theme will be able to use the More tag anywhere that posts are displayed. Note that if your theme displays excerpts, though, you will need to customize the excerpt itself. You can’t change it by adding a More tag to posts.
6. Adding Custom WordPress Excerpts Using Plugin
What if WordPress’s built-in custom excerpts functionality doesn’t do what you want … and you don’t want to use a More tag either?
There’s an easy solution. You can use a plugin to create and display custom excerpts.
First, you need to install and activate the Advanced Excerpt plugin.
If you haven’t installed a plugin before, take a look at our step-by-step instructions on how to install a WordPress plugin.
Once you have activated it, you can go to Settings » Excerpt to set up how it works.
Here, you can change things like how many characters or words the excerpt will display. You can decide whether to allow the excerpt to cut off mid-word or mid-sentence, too.
You can also restore the ‘Read More’ link that normally disappears from the custom excerpt. You can even change this to whatever text you want and change how it functions:
Tip: To use custom excerpts with this plugin, uncheck the box ‘Generate excerpts even if a post has a custom excerpt attached.’
It looks like this.
After making changes to the Advanced Excerpt settings, make sure you click the ‘Save’ button at the bottom of the screen.
With the Advanced Excerpt plugin, your excerpts will preserve your post’s formatting. Here’s an auto-generated excerpt with the plugin activated.
As you can see, the line break and italic text have been kept in.
By default, the Advanced Excerpt plugin will use excerpts on your home page, RSS feed, and other archive pages.
It does not make any changes to your content, and if you want to turn it off, then you can simply deactivate the plugin.
We hope this article helped you easily customize WordPress excerpts without any coding. You may also like our list of the plugins every business site must have or our guide on how to display blog post meta data in WordPress themes.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Mrteesurez
You’re absolutely right about the limitations of auto-generated excerpts. I’ve encountered this issue several times when working on my blog posts. Auto-generated excerpts often pull in text that isn’t relevant or engaging enough, especially if there’s a quote, image caption, or any other non-essential content at the beginning of the post. That’s why customizing your excerpts is so beneficial—it gives you the control to craft a compelling summary that accurately reflects the content and grabs the reader’s attention. For instance, when I customized excerpts for my posts, I noticed a higher click-through rate because I was able to highlight the key message or hook right from the start. This small adjustment can make a significant difference in how your content is perceived and interacted with.
Dom
Is there a way to edit the excerpt length on a specific page? or a specific category?
WPBeginner Support
If you wanted a custom length for a specific post or page then you would want to manually set the excerpt in the post/page itself.
Admin
Marie-Christine
Hello,
in code editor is there a way to display the Excerpt tab in the main window instead of in the side bar?
WPBeginner Support
We do not have a method we would recommend at the moment to force it into the main editing area.
Admin
Raihan
I’m facing a big problem. The excerpt is showing perfectly in desktop and tab responsive mode on the post. But the main issue is, it is not showing up in mobile responsive mode. What should I do…..?
WPBeginner Support
It would depend on the specific theme you are using as each theme has different styling but if you reach out to your theme’s support they can normally assist with the mobile styling.
Admin
Kristie
Thanks so much! I’ve been trying to solve this problem for a few weeks.
Kristie
Edwin
So I’m having an issue where anything I write in the excerpt box DOES NOT display verbatim but only display the first 40 characters or whatever from the content summary. What am I doing wrong here?
WPBeginner Support
You would want to check with your theme’s support as it sounds like a design for your specific theme.
Admin
Roni Lion
I may have missed it, but what I was looking for and did not find is how it looks to the user. A user sees a web page or post, sees the excerpts, clicks the more button–where and how does it display? It’d be meaningful to include in this post — unless you already did and I missed it!
WPBeginner Support
The display would heavily depend on your specific theme, as each are different we can’t say how your specific theme will display the excerpts
Admin
Rintesh Roy
Thanks for suggesting the ‘Ádvanced Excerpt’ plugin. It is quite good.
WPBeginner Support
Glad you found our recommendation helpful
Admin
Khubaib
Thank for excerpt solution, you guys are serving a lot of for the community.
WPBeginner Support
You’re welcome, glad you found our guide helpful
Admin
Temitayo
Please. advanced excerpts is not working for Divi theme
WPBeginner Support
If you reach out to the plugin’s support they should be able to assist you with a conflict like that.
Admin
Márcio
The new versions of the post editor hides the “add more tag” button.
The way I found to solve the problem was installing the classic editor plugin.
WPBeginner Support
For adding it in Gutenberg, you can use the more block or the manual excerpt can be found in the document’s settings
Admin
Nancy
I have installed the Advanced Excerpt plugin, selected a place on my posts for the Read More button & made sure except was selected in my screen options in the drop down box at the top but it doesn’t work. I have a long posts on my home page, no Read More button & don’t see how the plugin makes any difference at all. Please help. Thanks.
Leanna
This article is helpful for posts on the site, but does it carryover to automated emails sent to subscribers when new post is added? Currently emails show the entire new post, not giving them a reason to visit the site.
Theresa Fronius
This was SO helpful. I tried the first two, which did not help. But the last one, installing the Advanced Excerpt plugin – THAT DID THE TRICK! Wish I would have found this before I had invested so many hours in trying everything else under the sun. Thank you!
Bexster
That was a great post! I’ve been looking to remove image captions from being pulled into post excerpt summary – this easily did the trick! Also looking into this plugin too as need a call to action button not showing up at present. TY!!
Michał - Poland
Thank you very much. Ive been thinking for a long time, how to extend “excerpt” . Even try to find it somewhere in the code. Very greatful for this information.
Jeff Risley
Thanks! Very helpful
John
I am making a blog with wordpress free and with sapor I am stuck because I don’t know how to change a photo they already had on the blog I pressed a button on the top right corner and I chose a image and it came on top of the photo that had on I’m trying to change their one not add another so could you tell me how to do it (I’m doing it with sapor)
Kind regard’s
John
Jules
Thank you mucho this was soooo helpful and easy to understand too ..
Nic Mattson
I want to completely remove the automatic excerpt from appearing on certain posts display modules. Any advice?
Roz
Thanks a lot! it is helpful for me
shank
Thanks!! Advanced Excerpt plugin helped me on Twenty seventeen theme..
Ernie
Can you help me remove “read more” on my post pages. Even my privacy policy page have this annoying “read more” button. I installed WP and already had this button. Thanks!!
Great Ravian
How i can allow tag or other HTML tags in post excerpt without using a plugin?
shubham
how i can continue customizing my website which i left half on wordpress running with wamp.??
Ihsan
Dear Author,
Can you guide me on how to allow link (tag) on my post excerpt on Recent Post Extended plugin please? I tried few things – adding the tag on excerpt box, tried few things that I found online the last 3 hours, but no successful result. Please help.
Thank you and regards,
Ihsan
Hemang Rindani
WordPress is a powerful CMS platform that can handle large chunks of data through easy to use interface. Over a website it is important to showcase the offerings on the landing page to attract more visitors. WordPress provides excerpts that helps a developer to add a summary block to the webpage. This size, shape and color of the block can be customized by the user. The links to the entire content can be placed in the block and can be managed manually from the dashboard. Use only the authenticated plugins like Advanced Excerpt that doesn’t compromise the website security.
Ken Schleimer
The plug-in is a nice idea but I’d like to use an image instead of text for the “Read More” and haven’t found an easy way to accomplish it.
deuns26
hello,
this website has exactly the same Article.
I wonder who to create original article.
often it is the same article, but in other language.
Maxwell Ifeanyi Anozie
Pls,help me customize my wordpress account.This is my account:
WPBeginner Support
Please see our guide on the difference between self hosted WordPress.org vs free WordPress.com blog.
Admin
Sue Waterworth
I so appreciate your simple answers to what, for me, are complex questions. Thank you.