landbryo
1/5/2017 - 5:11 PM

Custom WordPress excerpt length via functions.php

Custom WordPress excerpt length via functions.php

///////////////////////////
// CUSTOM EXCERPT LENGTH //
///////////////////////////

function custom_excerpt_length($length) {
  return 40;
}
add_filter('excerpt_length', 'custom_excerpt_length');