Change WordPress Excerpt Length

Updated on

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?

Newsletter
Join over 280,000 independent website owners

The next person to join our monthly newsletter gets a 25% off coupon!

We guarantee 100% privacy. Your information will not be shared.

This entry was posted in . Bookmark the permalink.

Posted by , at Graph Paper Press

Thad is the founder of Graph Paper Press. Previously, he produced online multimedia and documentary projects for USA Today including the inauguration of President Barack Obama and many others. He lives in Brooklyn, NY with his wife Abby.

  • Google
  • Blog
  • Instagram

2 thoughts on “Change WordPress Excerpt Length”

  1. 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