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.

Instructions
Add this code to your functions.php file.

Comments

Leave a Reply

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

Snippet Info

Tested with Wordpress v. 4.8
Last Modified: 15.05.2018
Last Reviewed: 15.05.2018

How to change the WordPress default excerpt length
5 (100%) 2 votes
Please report broken snippets.
Report Broken Snippet
WP Engine