• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Nile Flores Media

Helping You Rock Out Your Website Like A Rockstar

  • Home
  • About
  • Blog
  • Portfolio
  • Hire Me
  • Resources
  • Contact
  • Blogging
  • WordPress
  • Social Media
  • SEO
  • Web Design
  • News
  • Podcast
You are here: Home » WordPress » Edit The Number Of Words For The Excerpt in WordPress

Edit The Number Of Words For The Excerpt in WordPress

By Nile Flores 3 Comments


wordpress-tricks-200x200Some people might think it is the number of lines you have to define to edit how long or short your excerpt in your WordPress article. It is not. It is defined by how many words. WordPress by default picks the first 55 words as your excerpt. However, if you wish to edit to make it shorter or longer you can definitely do that.

Apply a filter! Applying a filter to your theme’s functions.php file will prevent overwriting each time you go through a WordPress upgrade.

Edit The Number Of Words For The Excerpt in WordPress

1. Go to your functions.php of your theme template and add the following

add_filter('excerpt_length', 'my_excerpt_length');
function my_excerpt_length($len) { return 75; }

Change 75 to the number you want to use. Now your excerpts will be the length you want!

If you want to customize your excerpt any further, then take a look at the WordPress Codex on the_excerpt.

If you prefer not to use code, because you don’t like to touch code, or may be scared of messing something up on your website, you can use the following plugin – Advanced Excerpt.

Please remember that in applying the code to your functions.php, you will have to carry the code snippet over to new themes if they don’t offer an theme option for adjusting the characters for excerpts. Also, your theme must have the_excerpt template tag in the loop so this feature can work.

Do you use excerpts in your website? Were they built into your theme, or did you have to add the_excerpt template tag to your theme?

Please note, that I’ve removed the old method that I had written in this article, as that method way changed the core files and upgrades will only change it back. Also, it’s not the proper way to edit WordPress Core! (Thanks Mike Little!


Filed Under: WordPress Tagged With: edit wordpress excerpt length, excerpt, the_excerpt, wordpress, wordpress tricks

About Nile Flores

Nile is a 43-year old female from the greater St. Louis (Southern Illinois side) area. Nile is a mother of 1 son. She is also a web designer and developer, a graphic designer, and a public speaker, who exclusively designs and develops using WordPress. She also blogs at GoDaddy's Blog, Verpex Hosting's blog and her very personal sites, Pixelled and Nail Polish Happy.




Related posts:

How to Add an ‘Edit This Entry’ Link into a WordPress Theme Template Add More Social Network Handles To Your WordPress Author Profile Inserting Adsense Between Posts in WordPress Display First WordPress Full Entry and then Following as Excerpts Brand Your WordPress Login Page Without A Plugin

Reader Interactions

Comments

  1. Raj says

    November 8, 2011 at 7:17 am

    I guess we can create a child theme in WP and apply these changes over there in order to retain the original settings and go back whenever required. Is there an advantage in having a longer summary?

    Reply
  2. sandraw2580 says

    November 9, 2011 at 6:30 am

    Really great article.. I’ve always have problem with the wp-includes folder. That why I don’t go there cause I usually make everything look like crap.. But thank you for this tutorial, I’ll try it later.Wish me luck!

    Reply
  3. Joseph says

    November 10, 2011 at 9:58 pm

    It looks confusing but I know i will learn this. I am not techie when it comes to WP but i know i need to learn this .

    Reply

Leave a Reply Cancel reply

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

Primary Sidebar

Follow Me On:

  • Facebook
  • Instagram
  • LinkedIn
  • Twitter
  • YouTube

Get The Latest WordPress & Blogging Tips

Sign up for my newsletter, and also get my free ebook on 10 Reasons Why Your Website Isn't Converting, and How to Fix it!




Try to be More Positive on Social Media

Note: You can click on image and view the video in a larger lightbox window.

Footer

The Blog

Lots of free information, tutorials, and more to help you bring your best foot forward with your website.

  • Blogging
  • WordPress
  • Social Media
  • SEO
  • Web Design

Get The Latest WordPress & Blogging Tips

Sign up for my newsletter, and also get my free ebook on 10 Reasons Why Your Website Isn't Converting, and How to Fix it!

Copyright © 2025 · · WordPress