Change WordPress default excerpt length

Marko Krstić
19 Jan 2020

Add this code to function.php to change excerpt length to 20 words

<?php  
	add_filter( 'excerpt_length', function($length) {
    	return 20;
	} );

Was this article helpful?

Tags

Categories

Never miss new post again

Subscribe and get list of new posts in your inbox

Click to Copy