Master WordPress with IT10x

Step-by-step tutorials, code snippets, and best practices for customizing WordPress like a pro.

Explore Tutorials

WordPress Excerpt Length: How to Edit Post Excerpt in WordPress

Sun Oct 22 2023

WordPress Excerpt Length: How to Edit Post Excerpt in WordPress

The WordPress excerpt length should match the theme look and display the post summary without distorting the design.
So it is important to limit the WordPress excerpt length and customize the excerpt according to your needs.

In this article, you will learn how to customize and limit the length of your WordPress excerpt.

What is the Excerpt in WordPress?

A WordPress excerpt is a short description of a post that can be generated by WordPress or entered manually.
WordPress automatically generates an excerpt by extracting words from the beginning of a post by default.

WordPress Excerpt


When browsing through blog index or archive sections, you can preview the content of a post by seeing excerpts below the post title.
It helps to provide information about a post without having to display the entire post on the blog’s main page, category page, or search result page to visitors without clicking the link to the website.

Importance of Excerpt in WordPress

Visitors have the ability to search for more content on your website by viewing more posts on the index page instead of visiting the post.
Highlighting excerpt content under the post title on the display page is aimed at encouraging visitors to click the link to the post.

WordPress Excerpt’s short lines help to generate user interest in reading the entire article. So WordPress Excerpts help engage visitors on the website for a for extended period of time.
By improving engagement time, it also contributes to improving SEO. Search engine results can include excerpts that can enhance CRT.
Visitors can save time by seeing a brief summary of the post instead of having to go to the post page.

How to change the WordPress Excerpt Length and customize

The default setting for WordPress excerpt length is 55 words per post. You have the option to adjust the WordPress excerpt length to meet your requirements. A plugin can be used to customize the excerpt settings.
We can change the excerpt length manually or using a plugin.

Manually Changing WordPress Excerpt Length

To change the length of the WordPress excerpt manually, you have to insert code inside the function.php file.
To manually change the length of an excerpt, follow the steps below:

WordPress Excerpt Length

1 In the left pan select Appearance.
2 Click Theme File Editor option link.
3 Click the function.php file in the right pan.
Now copy and paste the following code in function.php file.

function my_excerpt_length($length){ return 55; } add_filter('excerpt_length', 'my_excerpt_length');

You can increase or decrease the word limit by changing the return value. Now we have set it to 55 “{ return 55; }”.

4 Now click Update File to save the changes.

Note: Sometimes this code may be already in your theme function.php file, you need not add code, just edit the old code.

For the Twenty Sixteen theme, you can use the Advanced Excerpt plugin because we need to do an advanced coding level to change the excerpt length in this theme.

Using a Plugin to Change WordPress Excerpt Length

If you do not need to change any code in your WordPress theme file, the easiest way is to use a WordPress plugin to change the excerpt length.

A plugin is a good option for themes like Twenty Sixteen where the code does not work properly or you want to do more customization with your post excerpt.

Installing and activating the Advance Excerpt plugin

Follow the steps to install and activate the Advance Excerpt plugin.

1 Select Plugins in the left pane of the WordPress dashboard.

2 Click Add New.

3 Search for an excerpt to search the plugin.

4 Now search for Advanced Excerpt Plugin, click Install Now, and after installation, click Activate.

WordPress Excerpt Length

After activation, you have to adjust the settings of the Advance Excerpt plugin according to your preferences.

Follow the steps for settings.

1 Select Settings in the left pane of the WordPress dashboard.

2 Click Excerpt

3 Now you can fill in the words or character count in the field as the length of the excerpt.

4 Choose your finish of output as Exact, Exact (count spaces as well), Word, or Sentence.

5 Select Add read more link to the excerpt if you want to add a link at the end of the excerpt to the full post.

WordPress Excerpt

Generate excerpts even if a post has a custom excerpt attached.

7 Make the whole excerpt a link to the post. If you select the option, visitors click the excerpt, which takes them to the full post.

8 Select the option to remove short-codes from the excerpt. (recommended).

9 Select any option to filter the content or excerpt.

10 Select the page option to disable the excerpt on that page.

11 Select the radio button to remove any keep tags.

12 Click the Save Changes button to save the settings.

WordPress Excerpt

Conclusion

WordPress excerpt plays an important role in engaging users and representing post ideas to visitors without visiting the post link. Visitors can choose which post to visit after reviewing a concise summary. Visitors become interested in reading the post due to it.
In this article, we have explained inserting code manually or using a plugin. With the plugin, you can customize your post excerpt with greater control.
We hope this article will help you customize and limit the length of the excerpt.

Related Posts