Title: Excerpt ignoring set length
Last modified: August 19, 2016

---

# Excerpt ignoring set length

 *  Resolved [beingalex](https://wordpress.org/support/users/beingalex/)
 * (@beingalex)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/excerpt-ignoring-set-length/)
 * Hi,
 * I have “the_excerpt();” in “index.php”. This works fine, and it is definitetly
   processing this page and function however, I am trying to limit the amount of
   words using:
 *     ```
       function new_excerpt_length($length) {
       	return 20;
       }
       add_filter('excerpt_length', 'new_excerpt_length');
       ```
   
 * in functions.php. This is getting completely ignored, plus I can’t set a more
   link on the end using the same technique.
 * Has anyone experienced this ?
 * Your help is much appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/excerpt-ignoring-set-length/#post-1390429)
 * Works okay for me. That filter does not work on the ‘manually’ crafted excerpt,
   only the excerpt manufactured from the post content.
 *  Thread Starter [beingalex](https://wordpress.org/support/users/beingalex/)
 * (@beingalex)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/excerpt-ignoring-set-length/#post-1390443)
 * Thanks, Michael.
 * I didn’t realise that.
 *  [David Calhoun](https://wordpress.org/support/users/dpcalhoun/)
 * (@dpcalhoun)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/excerpt-ignoring-set-length/#post-1390834)
 * I’ve been trying to figure this out for weeks. This explains a lot.
 * Is there any other way to set the length for a hard coded the_excerpt(); function?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Excerpt ignoring set length’ is closed to new replies.

 * 3 replies
 * 3 participants
 * Last reply from: [David Calhoun](https://wordpress.org/support/users/dpcalhoun/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/excerpt-ignoring-set-length/#post-1390834)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
