Change Excerpt Length In WordPress

Sometimes you need to change the default excerpt length in post or page summaries. WordPress defaults this to 55 and if your theme doesn’t allow you set this as a theme setting, add this to your functions.php file and set the value to your desired amount.

In the example below, I’ve set this to 100 characters, but you can change it to whatever.

function new_excerpt_length($length) {
return 100;
}
add_filter('excerpt_length', 'new_excerpt_length');

Useful post? Share it

Leave a Reply

Your email address will not be published.