apply_filters( 'excerpt_more', string $more_string )

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

Description Description

Parameters Parameters


(string) The string shown within the more link.

Top ↑

Source Source

File: wp-includes/formatting.php

View on Trac

Top ↑

Changelog Changelog

Version Description
2.9.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 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' );
  2. Skip to note 2 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 '&hellip;';
     add_filter( 'excerpt_more', 'my_theme_excerpt_more' );

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