Title: Changing Excerpt Length
Last modified: August 20, 2016

---

# Changing Excerpt Length

 *  [zubair04](https://wordpress.org/support/users/zubair04/)
 * (@zubair04)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/changing-excerpt-length/)
 * Hi,
 * Im trying to change the excerpt length shown in the post previews on the homepage.
   the loop php file is currently outputting ‘the_excerpt();’ in order to get the
   default output.
 * i have tried a few plugins, recommended functions to function.php and even modify
   the core file in wp-include, but everytime i get the same results – which is 
   no change.
 * could anyone give me a hand with this ?
 * thank you

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/changing-excerpt-length/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/changing-excerpt-length/page/2/?output_format=md)

 *  [Digital Raindrops](https://wordpress.org/support/users/adeptris/)
 * (@adeptris)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/changing-excerpt-length/#post-2260107)
 * This will really depend on your theme, so which theme are you using would be 
   a start, if it is a well known or free theme then it will be easier to answer?
 * The standard code should work, if it is not then it is likely your theme is changing
   it back somewhere else in the code.
 * Regards
 * David
 *  Thread Starter [zubair04](https://wordpress.org/support/users/zubair04/)
 * (@zubair04)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/changing-excerpt-length/#post-2260217)
 * hi,
 * Im using the twentyten theme, the basic theme that came with the wordpress package,
   but i have edited the styling quite a bit.
 *  [Aboobacker.](https://wordpress.org/support/users/abooze/)
 * (@abooze)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/changing-excerpt-length/#post-2260221)
 * Add the below code in your **functions.php**
 *     ```
       function new_excerpt_length($length) {
           return 200;
       }
       add_filter('excerpt_length', 'new_excerpt_length');
       ```
   
 * Increase the count as per your wish.
 *  Thread Starter [zubair04](https://wordpress.org/support/users/zubair04/)
 * (@zubair04)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/changing-excerpt-length/#post-2260232)
 * Hi, thanks for the help,
 * ive tried adding this , and other similar functions but to no avail.
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/changing-excerpt-length/#post-2260233)
 * if you are editing twenty ten directly, then the excerpt length is set in functions.
   php:
 *     ```
       function twentyten_excerpt_length( $length ) {
       	return 40;
       }
       add_filter( 'excerpt_length', 'twentyten_excerpt_length' );
       ```
   
 *  [Digital Raindrops](https://wordpress.org/support/users/adeptris/)
 * (@adeptris)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/changing-excerpt-length/#post-2260235)
 * Are you using a [child theme](http://codex.wordpress.org/Child_Themes) or the
   twenty ten theme?
 * You should really be using a child theme then this would go in the after_setup_theme
   hook!
 * In twenty ten you already have the function
 *     ```
       function twentyten_excerpt_length( $length ) {
       	return 40;
       }
       add_filter( 'excerpt_length', 'twentyten_excerpt_length' );
       ```
   
 * > * To override this length in a child theme, remove the filter and add your 
   > own
   >  * function tied to the excerpt_length filter hook.
 * So you could code:
 *     ```
       remove_filter( 'excerpt_length', 'twentyten_excerpt_length' );
   
       function my_twentyten_excerpt_length( $length ) {
       	return 50;
       }
       add_filter( 'excerpt_length', 'my_twentyten_excerpt_length' );
       ```
   
 * HTH
 * David
 *  Thread Starter [zubair04](https://wordpress.org/support/users/zubair04/)
 * (@zubair04)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/changing-excerpt-length/#post-2260236)
 * ive tried editing the return figure around line 231 in my functions.php file 
   in theme/twentyten but still no luck 🙁
 *  Thread Starter [zubair04](https://wordpress.org/support/users/zubair04/)
 * (@zubair04)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/changing-excerpt-length/#post-2260239)
 * i dont think im using a child theme, i have just been editing the php/css files
   in the twentyten theme folder, i will now try the suggestion from David
 *  Thread Starter [zubair04](https://wordpress.org/support/users/zubair04/)
 * (@zubair04)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/changing-excerpt-length/#post-2260241)
 * Ive tried davids code but it has not worked.
 * [http://thecypher.co.uk](http://thecypher.co.uk)
 * this is the site im working on. at the minute i am using a plugin which generates
   a thumbnail from the image in a post. im just wondering if that has anything 
   to do with it ?
 * thanks
 *  [Digital Raindrops](https://wordpress.org/support/users/adeptris/)
 * (@adeptris)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/changing-excerpt-length/#post-2260251)
 * Trial and error!
 * Something is changing it as the word count is 56, the theme is set at 40, deactivate
   the plugins and count the words in the excerpt, change the value and try again,
   them reactivate the plugins one at a time and see if it goes back to 56.
 * HTH
 * David
 *  Thread Starter [zubair04](https://wordpress.org/support/users/zubair04/)
 * (@zubair04)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/changing-excerpt-length/#post-2260253)
 * ah okay so it must be a plugin thats overriding the theme,
 * il try disabling each plugin and see what happens.
 * thanks for your help
 *  Thread Starter [zubair04](https://wordpress.org/support/users/zubair04/)
 * (@zubair04)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/changing-excerpt-length/#post-2260254)
 * ok so when i deactivate the ‘thumbnail for excerpts’ plugin . the site shows 
   the full post including the large image and the full text.
 * so its definitely to do with this plugin, unfortunatley the settings for this
   plugin does not have an option to edit the excerpt length…
 *  Thread Starter [zubair04](https://wordpress.org/support/users/zubair04/)
 * (@zubair04)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/changing-excerpt-length/#post-2260281)
 * thanks for your help everyone , the problem was in the php file provided by this
   plugin , at the bottom was a function where it redefined teh excerpt length
 *  [Joseph Shaw](https://wordpress.org/support/users/jshaw5000/)
 * (@jshaw5000)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/changing-excerpt-length/#post-2260282)
 * Grats! I hate it when plugins do stuff like that!
    🙂
 *  [Digital Raindrops](https://wordpress.org/support/users/adeptris/)
 * (@adeptris)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/changing-excerpt-length/#post-2260294)
 * > thanks for your help everyone , the problem was in the php file provided by
   > this plugin , at the bottom was a function where it redefined the excerpt length
 * If the plugin is well supported might be worth contacting the author, tell them
   of the issue and they may add this as a setup option.
 * It does not make a lot of sense to have set it 56 words only to pad it out to
   the image height, not considering different themes use different font sizes, 
   and different languages use different word lengths, so it should be a set option,
   or left alone.
 * Add the plugin name to the tags so others and maybe the author will be able to
   find this topic.
 * David

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/changing-excerpt-length/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/changing-excerpt-length/page/2/?output_format=md)

The topic ‘Changing Excerpt Length’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 19 replies
 * 5 participants
 * Last reply from: [zubair04](https://wordpress.org/support/users/zubair04/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/changing-excerpt-length/page/2/#post-2260323)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
