Change WordPress Post Excerpt Length

A post excerpt is a summary of your post. You can write an excerpt or let WordPress use the first few words of your post as the excerpt. Excerpts are at most 55 words by default, though you can change it by using the following snippet.

add_filter('excerpt_length', function($len) {
  return 100; // Change this to the length you want.
}, 20);

Leave a Reply

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