Control excerpt length in WordPress

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

You can add this snippet to your (child) theme's functions.php file.

No comments yet.

Leave a Reply