Dec 02, 2025
Ratna
3min Read
If you’re a WordPress user, you already know that the theme and WordPress core automates a lot of the features that dictate how your content is displayed. A common example is how pages display excerpts of your articles. But did you know that you can customize the WordPress excerpt length? This tutorial will explain how you can do just that!
Download all-in-one WordPress cheat sheet
An excerpt is a part of a post that links to the full article. It’s used to interest readers and makes them want to read further. It helps to highlight key points of your content as sometimes a title is not enough to get your audience’s attention.
By default, WordPress limits excerpts to the first 55 words of your post.
When using the classic WordPress editor, excerpts can be automatically added to your content by pressing the Read More button. It will add the <!–more–>tag to the HTML, which can be seen in the HTML editor. You can also type in a custom message like <!–more Continue Reading!–>.

Alternatively, you can change its length according to your needs. Providing more text can attract readers’ attention to the article.
There are different ways of doing this task. Below you will find instructions that will lead you through the process.
The two most common ways to change the excerpt length are either by doing it manually or by using a WordPress plugin.
The manual method involves tweaking the code. However, you don’t need to have in-depth knowledge in any programming language to do this.
Here are the steps to manually change the length of an excerpt:
function my_excerpt_length($length){ return 80; } add_filter(‘excerpt_length’, ‘my_excerpt_length’); For some themes, like Twenty Sixteen WordPress, you’ll need to edit the content.php file as well. Follow the guide below:
<div class=“entry-content”> <?php Add the following code snippet just below them:
if ( is_home() || is_category()||is_archive()){ the_excerpt(”); }else{ ?> </div><!-- .entry content --> Then insert the following line above them:
} // end of if statements The final result will look something like this:

One of the easiest ways to customize excerpt length is by changing it with a plugin. A recommended option for this task would be the Advanced Excerpt plugin. It’s free and easy to use.
By using the plugin, you can:
To install it, hover on Plugins on your WordPress Dashboard, and press Add New. Type in “advanced excerpt plugin” in the Keyword bar. Click the Install Now button, then Activate it.

Check out our other article on how to install plugins for a complete tutorial.
To use the plugin, follow the guide below:



One of the points that contribute to triggering a reader’s curiosity towards an article is the excerpt. When using WordPress, you can change the default excerpt length in two ways:
Happy editing!
How to Hide Page Title
How to Add Custom Fonts
How to Change Font Size
WordPress Custom Fields
WordPress Button Shortcode
Comments
December 23 2024
I used the following code in my functions.php as suggested above: function my_excerpt_length($length){ return 80; } add_filter(‘excerpt_length’, ‘my_excerpt_length’); And it gave a critical error on my website. Please test this code again...
January 09 2025
It sounds like there might be an issue with how the code was added. Please double-check if you edited the active theme's
functions.phpfile and ensure there are no missing PHP opening or closing tags. You can also try redoing the steps using a File Manager or an FTP client to make sure everything is added correctly. If the issue persists, I recommend enabling debug mode to identify the exact error. You can follow this guide to learn how to debug WordPress ;)