Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Hook to excerpt_length filter

Change the default excerpt length from 55 words to 20 words.

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