apply_filters( 'excerpt_more', string $more_string )

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



(string) The string shown within the more link.

Top ↑

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.

Top ↑


File: wp-includes/formatting.php

View on Trac

Top ↑


Version Description
2.9.0 Introduced.

Top ↑

User Contributed Notes

  1. Skip to note 1 content
    Contributed by SaltTechno

    How to replace […] by some other string?
    In following code, we are replacing […] by just …
    You can send any string in return.

     * Change the excerpt more string
     function my_theme_excerpt_more( $more ) {
         return '…';
     add_filter( 'excerpt_more', 'my_theme_excerpt_more' );
  2. Skip to note 2 content
    Contributed by Frank Klein

    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' );
  3. Skip to note 3 content
    Contributed by Steven Lin

    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.