Title: Custom excerpt filter does not cut the excerpt
Last modified: August 21, 2016

---

# Custom excerpt filter does not cut the excerpt

 *  [amcio](https://wordpress.org/support/users/amcio/)
 * (@amcio)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/custom-excerpt-filter-does-not-work/)
 * Hey
 * I’m trying to shorten the excerpt but it does not work. It shows the full excerpt
   which I write in the post edit!
 * I’ve added this to the functions.php
 *     ```
       function custom_excerpt_length( $length ) {
       	return 20;
       }
       add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
       ```
   
 * Even if I delete the above code it does not show default 55 words. I reviewed
   all my files and I can’t find the problem.
 * To show the excerpt I’m using `the_excerpt()`
 * Where can be the problem? Any ideas what can cause this?

Viewing 1 replies (of 1 total)

 *  [Ken Cook](https://wordpress.org/support/users/kencook/)
 * (@kencook)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/custom-excerpt-filter-does-not-work/#post-4529821)
 * `return 20;`
 * change that to:
    `return 999;`

Viewing 1 replies (of 1 total)

The topic ‘Custom excerpt filter does not cut the excerpt’ is closed to new replies.

## Tags

 * [excerpt](https://wordpress.org/support/topic-tag/excerpt/)
 * [filter](https://wordpress.org/support/topic-tag/filter/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Ken Cook](https://wordpress.org/support/users/kencook/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/custom-excerpt-filter-does-not-work/#post-4529821)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
