Categories
Code WordPress

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');