Change excerpt length in WP by eckert
The default excerpt length in WordPress is 55 words.
If you want to change it, go into “wp-includes”, “formatting.php” and scroll down to line 1812 (in versions prior to 2.7, it was line 853). If you are unable to find it, just do a find on the page for “55″ and you should come across it.
Change the “55″ to however many words you’d like it to be.
October 7th, 2008 at 7:43 am
Oh my goodness. I’ve been looking for that forever. How did you find that?
February 7th, 2009 at 7:25 pm
Thank you, this saved me so much time! Much appreciated
April 30th, 2009 at 10:38 am
I created a plugin for the WordPress backend to make it easier to change the length of the excerpt – without having to edit any core WordPress files.
http://wordpress.org/extend/plugins/excerpt-length/
The downside is that it only works in WordPress 2.7 and above.
May 10th, 2009 at 12:59 pm
thanks a lot, just solved a problem for a client :)
March 24th, 2010 at 5:46 am
it is so simple and works!
many tutorials on google like the following links doesn’t work.
http://www.google.com/search?aq=f&sourceid=chrome&ie=UTF-8&q=change+wordpress+lenght+default+excerpt
many thanks mister.
May 13th, 2010 at 12:56 pm
Or… you could just use filters :)
http://codex.wordpress.org/Template_Tags/the_excerpt
September 30th, 2010 at 1:21 am
I did a quick write up here for changing the WP Excerpt – How to change the_excerpt() in WordPress.
December 30th, 2010 at 1:40 am
You have solved my problem … thanks
March 21st, 2011 at 3:35 am
u can add theas lines in youre function.php file:
function hsbo_excerpt_length( $length )
{
return 60;
}
add_filter(‘excerpt_length’, ‘hsbo_excerpt_length’);
I used hsbo as the namespace, u can ofc use what ever u like
May 26th, 2011 at 9:16 am
THANK YOU SO VERY MUCH… omg, that was a strugle! ty!!