Adjust excerpt length in WordPress
Date: May 9, 2020
Add this to functions.php to achieve it:
function mytheme_custom_excerpt_length( $length ) {
return 20;
}
add_filter( ‘excerpt_length’, ‘mytheme_custom_excerpt_length’, 999 );
…
Add this to functions.php to achieve it:
function mytheme_custom_excerpt_length( $length ) {
return 20;
}
add_filter( ‘excerpt_length’, ‘mytheme_custom_excerpt_length’, 999 );
…