excerpt

All About Excerpt on WordPress

Last modified: May 19, 2026

Fiverr freelancers

An excerpt is a shortened preview of a post. You see excerpts on blog archive pages, search results pages, and in some themes on the homepage — a snippet of text that gives readers enough to know if they want to read more. WordPress generates excerpts automatically (trimming the post to a set number of words), but you can also write a manual excerpt in the WordPress editor for more control. Here’s how to customize both the length and the Read More link.

Show More

* This button will show the rest of the post and open up an offer from a vendor

How to Change Excerpt Length?

Sometimes the default excerpt length isn’t good for you and you need to lengthen it or shorten it. To change it, add this function to your theme’s functions.php file:

function custom_excerpt_length( $length ) {
  return 35	;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

Change the number 35 to however many words you want. The priority value (999) ensures your function overrides any default set by the theme.

A few practical notes:

  • Shorter excerpts (20-35 words) work well on grid-style blog layouts where you have limited card height.
  • Longer excerpts (50-75 words) are better for list-style layouts where you want to give more context before the Read More link.
  • This filter only affects auto-generated excerpts. If a post has a manual excerpt written in the Excerpt field in the WordPress editor, that manual excerpt is displayed instead, regardless of this setting.

To use the manual excerpt field: When editing a post, look for the Excerpt panel below the content editor. If you don’t see it, click Screen Options (top right of the edit screen) and enable the Excerpt checkbox. Write your custom excerpt there — it can be any length you want.

How to Change Excerpt Read More?

Have you seen themes that at the end of the excerpt you see this: […]? or a link saying read more?

By default, WordPress shows […] at the end of auto-generated excerpts. To change this, add a filter to your functions.php file.

Simple option — replace […] with custom text:

function wpdocs_excerpt_more( $more ) {
    return '...';
}
add_filter( 'excerpt_more', 'wpdocs_excerpt_more' );

Advanced option — replace […] with a linked Read More button:

function wpdocs_excerpt_more( $more ) {
    return sprintf( '<a class="read-more" href="%1$s">%2$s</a>',
        get_permalink( get_the_ID() ),
        __( 'Read More', 'textdomain' )
    );
}
add_filter( 'excerpt_more', 'wpdocs_excerpt_more' );

This adds a linked “Read More” to the end of every excerpt, pointing to the full post. Style it with CSS using the read-more class.

Other ways to control the Read More display:

  • Using the More block/tag: In the WordPress block editor, insert a More block inside your post at the point where you want the excerpt to end. On archive pages, only the content before the More block shows, with a Read More link automatically generated.
  • Theme settings: Many themes include options under Appearance > Customize to control excerpt length and the Read More text without touching code — check there before editing functions.php.

You can read more about excerpt here.

Final Word: WordPress Excerpts

Excerpts are a small detail with a real impact on how your blog archive and search results look. Getting the length right and replacing the default […] with a proper Read More link makes your site feel more polished. If you want more control without editing code, many themes handle this through the customizer — always check there first. For a related code snippet technique, see our guide on useful functions.php functions for WordPress.

Recap:
Save 4 Later
Email liked links to yourself

    Stay Updated with WordPress Insights

    Get the latest WordPress tips, theme reviews, and industry deals delivered to your inbox.