Limit Wordpress Excerpt Words Length

Change excerpt length in wordpress

By default wordpress excerpt words length is 55 words. If you want to limit wordpress excerpt word length from 55 words to something else then add this below code in your theme Functions.php file.

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

Change the number 20 to something as your needs.

Published by

Emdad Khan

I am Emdad Khan, A WordPress Theme Developer and Author of BN Web Design Website. A full time Freelancer on WordPress Theme Development & Optimization as well as blogger.

Leave a Reply