Change WordPress Excerpt Length

Sometimes you just need less. Or more.

Changing the default length of the WordPress excerpt is pretty simple. Open up your active theme’s functions.php file and add this to the very bottom:

Change 36 to your heart’s desire. The excerpt often shows up on archive pages as the shortened text for a post.

You just wrote a WordPress filter. Pretty easy, right?

2 responses to “Change WordPress Excerpt Length”

  1. Bas van der Linden Avatar
    Bas van der Linden

    Hello Thad, thanks for this post.

    Is there a way to create 2 “filters”(I guess that filters is the correct word judging by your post?)

    For example: I want to have 1 featured post with an excerpt length of 250 words
    and the other pages an excerpt length of 35 words

    I found another code from somewhere, so that’s what I’m using atm:
    Code that I’m using now is:

    Hope to hear from you!

Leave a Reply

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