Loading…

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.

Suggest An Answer

No suggestions avaliable!

Latest post from WordPress Interview Questions

Ask Question