If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

captcha

Featured templates

WordPress Cherry 3.x. How to change excerpt length limit

Our Support team is ready to present you a new tutorial that will show you how to change excerpt length limit in WordPress templates.

WordPress. How to change excerpt length limit

Excerpts can be displayed with shortcodes, widgets, you can see the excerpts on your Blog page.

Excerpt length can usually be changed in the corresponding shortcode, widget settings or page template php file.

In case you need to set big value for the excerpt length, you will need to change the excerpt length limit, which is 60 words by default.

In order to change the excerpt length limit, please do the following:

  1. Navigate to “wp-content/themes/CherryFramework” folder on your FTP. Open functions.php file.

  2. Locate the function for the excerpt length, the code will look like the following:

    	 /*
    * Custom excpert length
    *
    */
    if(!function_exists('new_excerpt_length')) {
    
    function new_excerpt_length($length) {
    return 60;
    }
    add_filter('excerpt_length', 'new_excerpt_length');
    }
         

    Please don’t edit this file or any other files inside “CherryFramework” folder.

  3. Copy the function body to themeXXXXX/includes/custom-function.php file. The code you need to copy:

    	 function new_excerpt_length($length) {
    return 60;
    }
    add_filter('excerpt_length', 'new_excerpt_length');
         
  4. Change the excerpt limit in this file now and save changes.

You can set any value less than the new excerpt length limit for the excerpt length.

Feel free to check the detailed video tutorial below:

WordPress. How to change excerpt length limit