apply_filters( ‘excerpt_more’, string $more_string )

Filters the string in the “more” link displayed after a trimmed excerpt.

Parameters

$more_stringstring
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

$excerpt_more = apply_filters( 'excerpt_more', ' ' . '[…]' );

Changelog

VersionDescription
2.9.0Introduced.

User Contributed Notes

  1. Skip to note 6 content

    How To Add A “Continue Reading” Link To Excerpts

    function wpdocs_excerpt_more( $more ) {
        return sprintf( '<a href="%1$s" class="more-link">%2$s</a>',
              esc_url( get_permalink( get_the_ID() ) ),
              sprintf( __( 'Continue reading %s', 'wpdocs' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
        );
    }
    add_filter( 'excerpt_more', 'wpdocs_excerpt_more' );
  2. Skip to note 7 content

    Example migrated from Codex:

    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' );

You must log in before being able to contribute a note or feedback.