Change WordPress Excerpt Length

Change the WordPress excerpt length to a desired number of words.
Mar 13, 2014 WordPress, wordpress snippets

You can add the following code in your theme’s functions.php file to change the WordPress excerpt length. Change the number (100) to the desired length.

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