WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Filter Reference/excerpt more

Description

This filter is used by wp_trim_excerpt() function. By default it is set to echo '[…]' more string at the end of the excerpt.

Examples

To change excerpt more string, add the following code to functions.php file in your theme:

function custom_excerpt_more( $more ) {
	return '[.....]';
}
add_filter( 'excerpt_more', 'custom_excerpt_more' );

For versions older than 2.9 use:

function custom_excerpt_more( $excerpt ) {
	return str_replace( '[…]', '...', $excerpt );
}
add_filter( 'wp_trim_excerpt', 'custom_excerpt_more' );

Change Log

Source File

wp_trim_excerpt() is located in wp-includes/formatting.php.

Related

This page is marked as incomplete. You can help Codex by expanding it.