How to edit the WordPress excerpt length easily

How to edit the WordPress excerpt length easily

WordPress Stuck in Maintenance Mode: How to Fix It Quickly

May 23, 2026

How to increase the WordPress memory limit

May 24, 2026

WordPress Stuck in Maintenance Mode: How to Fix It Quickly

May 23, 2026

How to increase the WordPress memory limit

May 24, 2026
 

Most WordPress sites ship with a 55-word excerpt limit and never touch it again.

That default affects how post previews look on archive pages, what gets pulled into RSS feeds, and what Yoast SEO or Rank Math outputs as your meta description in search results.

Getting WordPress excerpt length right matters more than most people think. A poorly trimmed post summary breaks grid layouts, gets cut off in social previews, and often hurts click-through rate.

This guide covers how the default excerpt word count works, how to change it, and how excerpt length connects to theme display, SEO, RSS output, and social sharing.

What Is WordPress Excerpt Length?

WordPress excerpt length is the number of words shown as a post summary on archive pages, search results, RSS feeds, and widgets, separate from the full post content.

The excerpt field appears in both the Classic Editor and the Gutenberg block editor as an optional section in the post settings panel. When left empty, WordPress auto-generates a post summary by trimming the first 55 words from the post body using the wp_trim_words() function.

Excerpt output is controlled by 2 core template tags in theme files: the_excerpt() and get_the_excerpt(). One echoes the result directly; the other returns it for further use in custom template logic.

Manual Excerpt vs. Auto-Generated Excerpt

Manual excerpt: Written directly in the Excerpt meta box. Overrides auto-generation completely and outputs exactly what you typed, with no word-count trimming applied.

Auto-generated excerpt: Pulled from the first 55 words of the post body. WordPress strips all HTML tags during this process, so only plain text appears in the output, regardless of formatting in the original content.

Auto-generated excerpts often cut mid-sentence. That's the main reason most developers and content teams set a custom excerpt word count or write manual excerpts per post.

Where WordPress Displays Excerpts by Default

WordPress uses the_excerpt() in 4 default contexts:

  • Blog archive and category pages
  • Tag archive pages
  • Search results pages
  • RSS feed output (when set to "Summary" in Settings > Reading)

Widgets like Recent Posts can also display excerpts, depending on the theme and widget configuration. Sidebar widgets that show post previews pull the same excerpt output as archive pages.

 

What Is the Default WordPress Excerpt Length?

The default WordPress excerpt length is 55 words. This value is defined inside wp-includes/formatting.php and filtered through the excerpt_length hook before output.

WordPress appends [...] after the trimmed text using a second filter hook: excerpt_more. Both the word count and the trailing string are adjustable.

Setting Default value Controlled by
Excerpt word count 55 words excerpt_length filter
Truncation string […] excerpt_more filter
HTML handling All tags stripped wp_strip_all_tags()
Manual excerpt override No word limit applied Post meta box / Gutenberg panel

A 55-word excerpt averages between 300 and 400 characters, depending on word length and topic. Technical content with longer terminology produces higher character counts than conversational writing (Hosted.com, 2025).

The 55-word default has been part of WordPress core since version 3.3, released in December 2011. It has not changed across any subsequent release.

WordPress measures excerpt length in words, not characters. This matters when working with languages that don't use spaces between words, like Chinese or Japanese. In those cases, wp_trim_words() can return the full post content rather than a trimmed excerpt, since the word-counting logic relies on whitespace.


The right excerpt length for SEO depends on how the excerpt is being used. When excerpts feed into meta descriptions via plugins like Yoast SEO or Rank Math, character count matters more than word count.

Google truncates meta descriptions at roughly 155-160 characters on desktop and around 120 characters on mobile (Spotibo, 2024). A 55-word auto-generated excerpt averages 300-400 characters, which is double the visible limit.

Excerpt Length When Used as a Meta Description

Yoast SEO and Rank Math both use the manual excerpt as the default meta description tag when no custom SEO description is set. This means excerpt character count directly affects how much text Google displays in search results.

Recommended excerpt length for meta description use: 150-160 characters, approximately 20-25 words.

  • Under 120 characters: may display fully on mobile, but gives limited context
  • 150-160 characters: optimal for desktop display without truncation
  • 300+ characters (default 55-word excerpt): gets cut off on every device

Excerpt length does not directly affect search rankings. John Mueller from Google has confirmed that meta description length is not a ranking factor. The SEO value comes indirectly through click-through rate when a well-written excerpt shows completely in the SERP snippet.

Featured snippet extraction pulls from body content, not from the excerpt or meta description. Keeping an excerpt short for meta use does not affect featured snippet eligibility.

Google's AI Overviews reference on-page content directly. The excerpt field has no specific role in AI Overview sourcing, though concise, declarative post content (which good excerpts often mirror) does align with how these summaries are structured.

I'm interrupting the article to tell you about BeTheme, the definitive multipurpose theme. If trying to satisfy multiple clients has become more stressful than rewarding, BeTheme is the solution for that.

BeTheme’s selection of hundreds of customizable, responsive pre-built websites is the highlight and a proven stress reducer.

The customizability of the theme makes it a dream come true for its users. There are 4 types of Page Builders that you can use with it: WPBakery, BeBuilder, and Elementor among them.

And now with the Live Builder, it’s even more impressive.

Check out BeTheme and see why our users love it!

The rest of the article is down below.

 

How Does WordPress Excerpt Length Affect Theme Display?

Most themes call the_excerpt() on archive, category, tag, and search result pages to display post preview cards. Excerpt length determines how much text appears in those cards, which directly affects visual layout consistency.

WordPress powers 43.4% of all websites on the internet as of 2025 (W3Techs), meaning excerpt display behavior affects a significant portion of the web's blog and archive layouts.

Excerpt Display in Grid vs. List Layouts

Short excerpts (20-30 words) work better for card-based grid layouts. Longer text breaks the visual balance when 3 or 4 post cards sit in a row.

Longer excerpts (40-55 words) suit single-column list layouts where vertical space is available and readers expect more context before clicking.

Mismatched excerpt lengths across posts break visual consistency. One post with 10 words and another with 55 words in the same grid row creates uneven card heights, which most grid-based themes handle poorly without fixed-height containers.

Theme-Specific Excerpt Controls (Divi, Astra, Genesis)

Divi includes a built-in "Excerpt Length" field inside the Blog module settings. It overrides the global excerpt_length filter for modules placed through Divi's visual builder, which can cause conflicts when both methods are active.

Astra handles excerpt output through its own theme functions and respects the excerpt_length filter. The Astra Customizer includes a post content type option (full content vs. excerpt) but does not expose a direct word-count field in the UI.

Genesis Framework uses its own genesis_excerpt_length filter, which is separate from the WordPress core filter. Setting excerpt length in functions.php using excerpt_length alone does not affect Genesis-based themes.


How to Change WordPress Excerpt Length?

WordPress provides 2 ways to set a custom excerpt word count: editing functions.php directly, or using a plugin.

Method Skill level Best for
functions.php filter Intermediate Site-wide control, conditional logic
Plugin (Advanced Excerpt) Beginner No-code adjustment, per-post-type settings
Theme built-in setting Beginner Divi, Astra, or theme-specific overrides

Changing Excerpt Length via functions.php

Add the following to your theme's functions.php file. Priority 999 prevents other plugins from overriding the value:

add_filter( 'excerpt_length', function() {
return 30;
}, 999 );

Change 30 to whatever word count fits your layout. This applies globally to all post types that use the standard excerpt_length filter.

Without priority 999, other plugins or theme functions running at a lower priority can override this value. This is one of the most common reasons a custom excerpt length appears to have no effect.

Changing Excerpt Length via Plugins

Advanced Excerpt is the most widely used plugin for this task. It adds a settings panel under Settings > Advanced Excerpt with fields for word count, character count, custom truncation strings, and HTML handling options.

Rank Math and Yoast SEO do not offer direct excerpt word-count controls, but both provide separate fields for custom SEO descriptions that override whatever the excerpt outputs as a meta description.


How to Change the Excerpt "Read More" Text and Truncation String?

The default [...] appended to auto-generated excerpts is controlled by the excerpt_more filter. Most sites replace it with a "Read More" link that points directly to the full post.

Add this to functions.php:

add_filter( 'excerpt_more', function() {
return '... <a href="' . get_permalink() . '">Read More</a>';
} );

This outputs a linked "Read More" directly after the excerpt text, which increases click-through from archive pages compared to the plain [...] default.

Common Conflicts with the excerpt\_more Filter

Theme override conflict: Some themes add their own excerpt_more filter in their own functions.php. If two filters are running, the one with the higher priority number wins. Set your custom filter to priority 999 to ensure it takes effect.

WooCommerce product excerpts use a separate filter: woocommerce_short_description. The excerpt_more filter does not apply to WooCommerce product short descriptions, which are handled entirely within WooCommerce's own template system.


How Does Excerpt Length Affect RSS Feed Output?

WordPress RSS feed settings offer 2 options in Settings > Reading: full text or summary. When set to summary, the feed outputs the excerpt using the same the_excerpt() function applied to archive pages.

Any change to excerpt length in functions.php applies directly to RSS feed output. Setting a 30-word excerpt affects both the archive page display and the RSS summary simultaneously.

RSS Excerpt Length and Feed Reader Display

Feed readers like Feedly and Inoreader display the excerpt as the post preview inside the reader interface. Short excerpts (20-30 words) push readers to click through to the full post. Longer excerpts give enough context that some readers may not click at all.

The WordPress.com platform, which handles over 70 million new posts per month (WordPress.com, 2025), uses excerpt-based RSS summaries across its hosted blogs by default, reinforcing the excerpt-length-to-engagement connection at scale.

One thing worth knowing: if a post has a manual excerpt set in the editor, that manual text overrides auto-generation for both archive pages and RSS output. Manual excerpts written for reader display do not automatically fit social or meta description character limits, so they often need separate optimization.

Full Text vs. Summary: Which RSS Setting to Use

Full text: Better for readers who consume content entirely inside a feed reader. Common for newsletters and dedicated subscriber audiences.

Summary: Better for driving traffic back to the site. Excerpt length directly determines how much of the post content the subscriber sees before needing to click.

Most content-driven sites default to summary mode with a 30-40 word excerpt, giving enough context to generate interest without replacing the value of visiting the full post.

How to Set Custom Excerpt Length for Specific Post Types?

The excerpt_length filter applies globally by default. To set different word counts for different post types, use conditional logic inside the filter that checks get_post_type() before returning a value.

WooCommerce is used by 9.2% of all websites as of October 2024 (W3Techs), making product excerpt handling one of the most common custom excerpt scenarios WordPress developers deal with.

Custom Excerpt Length for WooCommerce Products

WooCommerce short description is a separate field from the core post excerpt. It appears above the "Add to Cart" button on single product pages and is controlled by its own filter: woocommerce_short_description.

The core excerpt_length filter does not apply to WooCommerce product short descriptions. They function independently of the standard auto-generation process in wp-includes/formatting.php.

For WooCommerce archive pages and shop loops, product short descriptions pull from this field directly. Length is best controlled by writing the short description to a specific character count rather than relying on a filter.

Custom Excerpt Length for Custom Post Types

Custom post types registered with 'excerpt' in the supports array use the same excerpt_length filter as standard posts. Target them with a conditional check:

add_filter( 'excerpt_length', function() {
if ( get_post_type() === 'portfolio' ) {
return 20;
}
return 55;
}, 999 );

Custom post types that were not registered with excerpt support need one additional step. Add add_post_type_support( 'your-cpt', 'excerpt' ); inside an init action before the excerpt_length filter will have any effect on them.

The Events Calendar and other plugin-registered post types often handle excerpt output through their own template functions. For those, check the plugin's documentation before applying a functions.php filter, since conflicts are common.


How Does Excerpt Length Affect Social Sharing and Open Graph?

Excerpt length directly affects social link previews when plugins like Yoast SEO or Rank Math use the manual excerpt as the default source for the og:description tag.

Platform Description display limit Optimal excerpt length
Facebook (desktop) ~155 characters 120-155 characters
Facebook (mobile) ~55-65 characters Under 65 characters
LinkedIn ~120-160 characters 120-155 characters
Twitter/X card ~200 characters 150-200 characters

The recommended og:description length is 120-160 characters across platforms (Swetrix, 2024). A 55-word auto-generated excerpt sits at 300-400 characters, meaning social previews will always be truncated unless a shorter manual excerpt is set.

How Yoast SEO and Rank Math Use the Excerpt

Both plugins follow the same priority order for og:description output:

  • Custom social description entered in the plugin's post settings panel (highest priority)
  • Manual excerpt from the post editor
  • Auto-generated excerpt as a fallback

Writing a manual excerpt at 150 characters handles both the meta description and the social preview in one step, without needing to fill in 3 separate fields per post.

Facebook Caching and og:description Updates

Facebook caches Open Graph data for weeks to months. After changing an excerpt that feeds into og:description, the old preview continues showing on Facebook until the cache is cleared manually using the Facebook Sharing Debugger tool.

LinkedIn caches for approximately 7 days. Twitter/X refreshes within a few days. Both can be forced through their respective developer debugging tools, though most teams skip this step and let caches expire naturally.


What Are Common WordPress Excerpt Length Problems and Fixes?

Most excerpt problems fall into one of 5 categories. The fixes are straightforward once you know which part of the excerpt pipeline is breaking.

Fixing HTML Rendering Inside Excerpts

Auto-generated excerpts strip all HTML tags using wp_strip_all_tags() during generation. Manual excerpts, by contrast, allow limited inline HTML like <strong> and <em>.

WordPress 6.3 introduced a regression where the Post Excerpt Block also stripped inline HTML from manual excerpts displayed inside Query Loop blocks (WordPress.org support forums, August 2023). The workaround is using the Latest Posts block instead of the Post Excerpt block inside Query Loops when HTML formatting in excerpts needs to be preserved.

To allow HTML in auto-generated excerpts, the standard approach is to replace the default wp_trim_words() call with a custom function using wp_trim_words() applied after selective tag preservation rather than full stripping.

Resolving Plugin Conflicts with Excerpt Filters

Plugin conflicts are the most common reason a custom excerpt length set in functions.php appears to have no effect. The problem is filter priority.

Diagnosis: add var_dump( apply_filters( 'excerpt_length', 55 ) ); to a template temporarily to see which value is actually being returned.

Solution options, in order of reliability:

  • Set filter priority to 999 in your custom function
  • Deactivate plugins one at a time to identify the conflicting plugin
  • Use remove_all_filters( 'excerpt_length' ); before re-adding your own filter

Excerpt Not Showing on Custom Post Type Archives

Took me a while to figure this one out the first time. The cause is almost always a missing support declaration during post type registration.

Fix: confirm 'excerpt' is included in the supports array when calling register_post_type(). If the post type was registered by a plugin you don't control, add support after the fact using add_post_type_support( 'your-cpt', 'excerpt' ); inside an init hook.

Excerpt Field Missing in Gutenberg

The Excerpt panel is hidden by default in the Gutenberg editor for many installs. Enable it through the Document Settings panel on the right sidebar. If it still doesn't appear, check that the post type has excerpt support registered and that no plugin is suppressing the panel through the allowed_block_types_all or REST API filters.


How to Control Excerpt Length in the WordPress Block Editor (Gutenberg)?

Gutenberg handles excerpt length in 2 separate ways, depending on whether you're using the classic post editor panel or the Post Excerpt Block inside Full Site Editing templates.

The block editor does not change how the excerpt_length filter works for auto-generated excerpts. A custom word count set in functions.php still applies.

Excerpt Panel in the Gutenberg Post Editor

The Excerpt panel in the Gutenberg Document Settings sidebar works the same as the Classic Editor meta box. Text entered here becomes the manual excerpt, overrides auto-generation completely, and has no word-count limit applied.

Key difference from auto-generation: manual excerpts written in this panel support limited inline HTML. They are not stripped by wp_strip_all_tags() when displayed via the_excerpt() in classic theme templates.

Post Excerpt Block Settings in Full Site Editing Themes

Full Site Editing (FSE) themes use the Post Excerpt Block inside Query Loop templates. This block has its own independent word count control in the block inspector panel on the right sidebar.

The FSE Post Excerpt Block's word count attribute defaults to 55 words, matching the core filter default (Full Site Editing documentation, fullsiteediting.com). It is set per block instance, not globally, which means different templates can display different excerpt lengths without touching functions.php.

Setting excerpt length in functions.php via the excerpt_length filter does not affect Post Excerpt Block output in FSE templates. The two systems are independent. If your site uses an FSE theme like Twenty Twenty-Four or Twenty Twenty-Five, the block inspector is where excerpt length is managed.

Editor type How excerpt length is set Functions.php affects it?
Classic theme + the\_excerpt() excerpt\_length filter Yes
Gutenberg post editor panel Manual excerpt field No (overrides filter)
FSE Post Excerpt Block Block inspector word count No (independent)
Genesis Framework themes genesis\excerpt\length filter No (separate filter)

Most sites using page builders or hybrid setups run multiple excerpt systems at once without realizing it. If you change the excerpt_length filter and nothing changes on your archive pages, check which excerpt system your theme is actually using before digging further into functions.php.

For anyone building or auditing blog-heavy WordPress sites, understanding how excerpt display relates to broader theme decisions is part of what separates a clean build from one that's tricky to maintain. The same attention to detail that goes into picking the right WordPress review plugins or setting up post types correctly applies here. Excerpt length is a small setting with wide-reaching effects on layout, SEO snippets, RSS feeds, and social sharing.

FAQ on WordPress Excerpt Length

What is the default WordPress excerpt length?

The default WordPress excerpt length is 55 words. This value is set inside wp-includes/formatting.php and has not changed since WordPress 3.3. Auto-generated excerpts strip all HTML tags and append [...] after the trimmed post content.

How do I change the excerpt length in WordPress?

Add the excerpt_length filter to your theme's functions.php file. Set the priority to 999 to prevent other plugins from overriding it. Alternatively, use a plugin like Advanced Excerpt to adjust the excerpt word count without touching code.

Does excerpt length affect SEO?

Not directly. Excerpt length does not influence rankings. But when plugins like Yoast SEO use the excerpt as a meta description, a long excerpt gets truncated in search results at around 155-160 characters, which can reduce click-through rate.

What is the best excerpt length for SEO?

For meta description use, keep excerpts between 150-160 characters, roughly 20-25 words. This fits within Google's display limit on desktop. The default 55-word auto excerpt averages 300-400 characters, exceeding the visible limit on every device.

What is the difference between a manual excerpt and an auto-generated excerpt?

manual excerpt is written in the Excerpt meta box and overrides auto-generation entirely, with no word-count trimming applied. An auto-generated excerpt pulls the first 55 words from the post body, strips all HTML, and appends the excerpt_more string.

How do I change the excerpt length for a specific custom post type?

Use conditional logic inside the excerpt_length filter, checking get_post_type() before returning a value. First confirm the post type was registered with 'excerpt' in its supports array, or add support using add_post_type_support() inside an init hook.

Why is my excerpt length not changing after editing functions.php?

A plugin is most likely overriding your filter. Set your filter priority to 999 to ensure it runs last. To diagnose the conflict, temporarily use remove_all_filters('excerpt_length') before re-adding your own filter and test which plugin is interfering.

Does the excerpt\_length filter work with Full Site Editing themes?

No. FSE themes use the Post Excerpt Block inside Query Loop templates, which has its own independent word count setting in the block inspector. The excerpt_length filter only affects themes using the_excerpt() in classic PHP templates.

How does excerpt length affect RSS feed output?

When Settings > Reading is set to Summary, RSS feeds output excerpts using the same the_excerpt() function as archive pages. Any change to the excerpt_length filter applies to both archive display and RSS feed summaries simultaneously.

How does WordPress excerpt length affect social media previews?

When the manual excerpt feeds into the og:description tag via Yoast SEO or Rank Math, its length controls what appears in social link previews. Facebook displays roughly 155 characters on desktop. Excerpts longer than that are always truncated in social sharing previews.

Conclusion

This conclusion is for an article presenting how excerpt length touches nearly every part of a WordPress site, from the excerpt_length filter in functions.php to the Post Excerpt Block in Full Site Editing themes.

The 55-word default is rarely the right fit. Archive page layouts, RSS feed summaries, and og:description output all behave differently depending on how post truncation is configured.

Getting the word count right per context, whether that's a WooCommerce short description, a custom post type archive, or a meta description fed into Rank Math, saves time and prevents layout and preview issues down the line.

Small setting. Wide reach. Worth getting right the first time.

Albert Ślusarczyk

Albert Ślusarczyk

As the co-creator of Be Theme, I am a strong believer in designing with care and patience. I pour my energy, time & knowledge into perfecting the theme for our 260,000+ customers.
Buy now 700+website templates