Home / WordPress / Change Excerpt Length in WordPress

Change Excerpt Length in WordPress

WordPress core has many great features to manage your content. Once of them is displaying the excerpt from the content. And the great thing is, we can modify the length of the excerpt easily.

Don’t worry if you are not familiar with coding, we are going to discuss both ways to change the excerpt length of your WordPress website.

Change Excerpt Lenght Through Code

The first method is to modify slightly into the functions.php file from your theme. The WordPress core functionality has provided an excerpt_length filter hook that can be used to modify the length of the excerpt.

But we should know how to use the hooks in WordPress theme. You just need to go to your themes directory through any suitable FTP client like FileZilla or cPanel. And open the functions.php file. Paste the below code at the bottom of your file and hit the save button.

add_filter( 'excerpt_length', 'wp4884_excerpt_length' );
function wp4884_excerpt_length() {
    return 70;
}

Using Plugin to Change the Excerpt

Another and most common way is to use the plugin to change the excerpt length. The Advanced Excerpt is one of the great and easy-to-use plugin.

Advanced Excerpt

You just need to go to the Plugins and click Add New. Now type the Advanced Excerpt to the search bar under Add New Plugin page. The plugin should appear some like the below image.

Now click to the Install Now button and activate the plugin once the installation finishes. Now go the plugin settings and make the changes as per your requirements.

Advanced Excerpt Settings

We hope this article will help you to learn how to change the excerpt length in your WordPress site. If you like this article then please follow us on Facebook and Twitter.