WordPress: Change the Excerpt Length

The following can be added to your theme’s functions.php to alter the excerpt word count.

//Filter the excerpt
function new_excerpt_length($length) {
 return 20;
}
add_filter('excerpt_length', 'new_excerpt_length');

You may also like...

Leave a Reply

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

%d bloggers like this: