How To Change The Post Default Excerpt Length On WordPress

How To Change The Post Default Excerpt Length On WordPress
How To Change The Post Default Excerpt Length On WordPress

This code will let you define a new custom default excerpt length for the WordPress excerpts display.
The following example will set the default excerpt length to 25 characters.

Instructions
Add this code below to your functions.php file.

function codetechinix_excerpt_length($length) {
     return 20;
}
add_filter('excerpt_length', 'codetechinix_excerpt_length');

You can change the function name

Spread the love

You Might Also Like

Leave a Reply

Your email address will not be published.