apply_filters( 'excerpt_length', int $number )
Filters the number of words in an excerpt.
Description Description
Parameters Parameters
- $number
-
(int) The number of words. Default 55.
Source Source
Changelog Changelog
Version | Description |
---|---|
2.7.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Set the excerpt length based on a theme mod, through the Customizer.
This will help to apply the excerpt_length on front end only.
Notes: This will display your excerpt text up to 30 words using excerpt_length filter. By default the number of words is 55.
Example:-
This will display your post excerpt up to 30 words.