• Skip to main content
  • Skip to footer
HostingWiki

HostingWiki

  • Home
  • Guides
  • About

August 29, 2019 - WordPress

WordPress 101: How to Change the Length of Post Excerpts

Paulius Ž.

You might have seen blog posts that are not fully displayed when visiting a WordPress site – those are called post excerpts. By default, WordPress limits an excerpt length to 55 words, but there is a way to customize that limit.

In this article, you will learn two ways to achieve this.

Introduction to the WordPress Excerpt

WordPress Excerpt is a short preview of a post which usually appears on the home page, index pages, or the archives. It provides a glimpse into the article without showing the whole piece.

These excerpts provide two benefits – it will give your website a more simple look, and it can build readers’ interest to read the rest of the article.

Sometimes, post excerpts with limited length aren’t enough to build readers’ interest or to express the main idea of each post. On top of it, some WordPress themes even restrict the length of post excerpts.

Hence, it’s essential to know how to customize the length of these excerpts and there are two methods you can try out. The first one is by manually adding the code and the second – by using a WordPress plugin.

Two Methods to Change the Length of Post Excerpts

Now that you’re familiar with WordPress excerpts, let’s try to modify their length using the two methods mentioned previously.

Manually Adding the Code

First of all, access the theme editor on your WordPress dashboard and open the functions.php file. Here you can insert my_excerpt_length function, so let’s change the limit to 120 words. Here’s the snippet of the code:

function my_excerpt_length($length) {

return 120;

}

add_filter('excerpt_length', 'my_excerpt_length');

Customizing WordPress post excerpt length.

Once saved, the default excerpt limit will be extended to 120 words. However, you can set it to any number that is suitable for you since there’s no restriction on how many words a single excerpt is able to display.

Using a WordPress Plugin

Using a plugin is easier and can be done with only a few single clicks. Go to your WordPress admin dashboard, click Plugins on the left, and click Add New. Here you can look for and install any plugin that you want.

There are plenty of excerpt plugins on the WordPress plugin directory, and here are some of the best options out there:

  • Gocha Better Excerpt – allows you to set your own chars and strings to define the end of the excerpts. This plugin will cost you $12 for six-month support.
  • Smart Post Lists – can set the post excerpts in the form of a widget. This plugin costs $19 for six-month support.
  • Advanced Excerpt – customizes the excerpt length and completes the last word or sentence in an excerpt. This plugin is free to use!

Wrapping Up

To recap, there are two ways how you can change the length of post excerpts for your site – by either manually adding the code or using a WordPress plugin.

That’s it! If you have any questions, share them in the comment section below!

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Footer

HostingWiki Logo

Site Links

  • Contact Us
  • Mission
  • About
  • Sitemap

Legal

  • Privacy Policy
  • Terms of Use
  • Cookie Policy
  • Contact Us
  • Mission
  • About
  • Sitemap

Additional menu

© 2021 HostingWiki is a Hostinger publication.