When viewing a WordPress site you’ll see the posts are not displayed fully on pages. Instead of that, only a part of the content is displayed. That part is called excerpt. See now how to edit this posts excerpts area

Here is a screenshot that uses an excerpt on the blog page:

How to Customize WordPress Excerpts
Excerpt in WordPress themes

Using excerpts from WordPress themes has some benefits:

  • It keeps your homepage or blog page short and focused. Your readers see only the brief description of the posts. When they need to see more information, they can just click on the posts to read more.
  • It makes the WordPress design clean and clear. It gives your readers “a space to breath”. If you’re a designer, you’ll know that using white space well is an important key to a successful design. That’s why most WordPress templates use an excerpt.

The Problem With WordPress Excerpt

While using excerpt is very common, it has a problem: the number of characters or words in the excerpt is usually fixed by the theme. A number X might look fine in a language, but might not in another language. or even when you design your post with some page builder and the post excerpt shows codes on it.  And because of that, the excerpt length (or excerpt limit) should be able to change.

Customize Excerpts

There are basically 3 ways to change the excerpt length.

1. Manually Customize Excerpt

How to Customize WordPress Excerpts Without Code
How to Customize WordPress Excerpts Without Code

 

There are 2 types of an excerpt:

  • The automatic excerpt: that is generated from the content of the post. Usually, the automatic excerpt takes 55 first words from the post content. The number of words (55), of course, is what we’re going to change.
  • The manual excerpt that users can enter themselves when editing a post. The manual excerpt is entered in the Excerpt meta box below the main editor as in the screenshot below:
How to Customize WordPress Excerpts
Manually enter the excerpt

Not many people know and use the manual excerpt! It’s a big mistake. Using manual excerpt helps you to:

  • 100% control what displays in the excerpt
  • Improving SEO score

Regarding the SEO, some SEO plugin such as Yoast SEO automatically takes the excerpt content and display it as the description in the search results. Using manual excerpt, you can customize this description and increase the click-through-rate. To enter the manual excerpt, simply enter the content in the Excerpt meta box below the editor as shown in the screenshot above. That’s very simple.

But just note that if you use a manual excerpt, the read more link might disappear. This depends on the WordPress theme you’re using. It doesn’t always happen but happens in most cases. If you want to keep the read more link, you should take a look at the automatic excerpt.

2. Change Excerpt Length With Code

If you know the code, you can customize the excerpt length easily. Open the functions.phpfile of your theme and enter the following code:

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

Remember to change to30 the number of words you want to show in the excerpt.

When using a code, it’s recommended to use a child theme. Because when you’re the current WordPress theme updates, your customization will be lost.

How to Customize WordPress Excerpts
How to Customize WordPress Excerpts

 

3. WordPress Plugins To Change Excerpt Length

The 3rd way and the easiest way to change excerpt length is using a WordPress plugin. We have researched and here are the 3 best WordPress plugins to change excerpt length.

CHANGE EXCERPT LENGTH

Author(s): Ashkar

This plugin is very simple. It adds only 1 option in the Settings → Reading page for excerpt length. You just need to enter the number of words in the excerpt and done!

Plugin settings page

CUSTOM EXCERPT LENGTH

Author(s): The Krotek

This plugin is very similar to the plugin above. It also adds an option for excerpt length in the Settings → Reading page:

EXCERPT LENGTH

Author(s): Lee Kelleher

This plugin not only helps you to customize the excerpt length but also the excerpt more text. It’s similar to both the plugins above. These plugins are very simple and very lightweight. They don’t affect your website loading speed but provide a very good way to customize the website without touching code. We have tested these plugins and use them for some of our customers. It works nicely.

How to Customize WordPress Excerpts
How to Customize WordPress Excerpts

 

Share This Post