Close this search box.

How to Change the Default Excerpt Length in WordPress?

Affiliate disclosure: In full transparency – some of the links on our website are affiliate links, if you use them to make a purchase we will earn a commission at no additional cost for you (none whatsoever!).

The WordPress theme and software itself automate the creation of a large portion of your site’s content, which is one of the key draws.

The excerpt feature, for example, displays the first “55” words of your article on the homepage, archive pages (category and tags), and search results pages.

But what if you needed to share a smaller or larger snippet than the standard 55 words?

When amending a post, you have the option of either using the “more” function to select a specific place for the excerpt or using the excerpt box to paste a custom excerpt.

To avoid any duplicate content concerns and keep in good standing with search engines like Google, I recommend using the custom excerpt option, which allows you to not only specify a custom excerpt but also make it 100% unique.

However, you will likely want to utilize some code or a plugin if you currently have hundreds or thousands of articles published, and you want to rapidly modify the excerpt length, so all your post entries are consistent.

Modifying the Extract Length of All Recurring Elements

The default length of your excerpts may be modified in your theme, and thankfully WordPress has a built-in filter suitably titled “excerpt length” to do just that.

To change the number of words shown in excerpts, copy and paste the following code into your functions.php file, replacing the “20” with the desired number of words.

Alternatively, you may check out the free plugin Advanced Excerpt, which will let you easily modify not just the excerpt length but also the read more link, the stripping out of shortcodes, the allowance of html, and so on.

How to Change the Default Excerpt Length in WordPress


Both of those approaches presume, of course, that your theme is already set up to make use of the excerpt function.

Extraction features often come pre-built into themes (particularly paid ones), giving you more leeway. If the preceding code does not work for you, contact the theme’s author and inquire as to how to modify the excerpt lengths.

Cut-to-Fit Paragraphs (for Developers)

If you’re a developer seeking to add configurable excerpts to your theme or plugin, we’ve put up a guide with a handy custom function you can copy and paste into your project to show off variable excerpt lengths throughout the site for various archives, post kinds, etc.

Quick Links:

Conclusion: How to Change the Default Excerpt Length in WordPress?

Above we mentioned an overview of this topic. If still, you have any queries, suggestions or advice then do let us know in the comment section below.


Jitendra Vaswani is the founder of SchemaNinja WordPress Plugin, prior to SchemaNinja he is the founder of many internet marketing blogs, and He is a successful online marketer & award-winning digital marketing consultant. He has been featured on HuffingtonPost, BusinessWorld, YourStory, Payoneer, Lifehacker & other leading publications as a successful blogger & digital marketer. Jitendra Vaswani is also a frequent speaker & having 8+ yrs experience of in the Digital Marketing field. Check out his portfolio( Find him on Twitter, & Facebook.