excerpt_more WordPress Filter Hook
The excerpt_more hook is a great way to customize the default WordPress excerpt. This hook allows you to specify what should be displayed after the excerpt. By default, WordPress will display a "Read More" link after the excerpt, but you can use this hook to change that to something else, like a "Continue Reading" link or button.
apply_filters( 'excerpt_more', string $more_string ) #
Filters the string in the “more” link displayed after a trimmed excerpt.
Parameters
- $more_string
(string)The string shown within the more link.
More Information
This filter is called by the wp_trim_excerpt() function. By default, the filter is set to echo ‘[…]’ as the excerpt more string at the end of the excerpt.
Source
Changelog
Version | Description |
---|---|
2.9.0 | Introduced. |