Custom WordPress excerpt length via functions.php
/////////////////////////// // CUSTOM EXCERPT LENGTH // /////////////////////////// function custom_excerpt_length($length) { return 40; } add_filter('excerpt_length', 'custom_excerpt_length');