By
09/04/2016   Comments Off on Change the WordPress excerpt length

View all snippets

Drop this in your functions file. Change the number to how many words you want to display before the excerpt is truncated with a “read more” link.

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