How to change the WordPress default excerpt length

This snippet will let you define a new custom default excerpt length for the WordPress excerpts output.
The following example will set the default excerpt length to 20 characters.

Add this code to your functions.php file.


Leave a Reply

Your email address will not be published. Required fields are marked *

Siteground Web Hosting