How to change the default length of the excerpt in WordPress?
To change the default length of the excerpt in WordPress, we have to insert the below-mentioned syntax to the functions.php
file and edit the amount of the words that we desire to be displayed in our excerpts.
add_filter( 'excerpt_length', function($length) {
return X;
} );
Here above X is the number of words to be displayed.
BY Best Interview Question ON 07 Jul 2019