Site logo

Archived topic

Customizing the Excerpts Read More

3 replies · Started by Robert on March 26, 2019

Viewing posts 1–4 of 4

I'd like to change my excerpts Read more link to Read: "Post Title".

Hi there,

Try this:

add_filter( 'generate_excerpt_more_output', function() {
    return sprintf( ' ... <a title="%1$s" class="read-more" href="%2$s">Read: %3$s</a>',
        the_title_attribute( 'echo=0' ),
        esc_url( get_permalink( get_the_ID() ) ),
        get_the_title()
    );
} );

Adding PHP: https://docs.generatepress.com/article/adding-php/

Awesome

Glad I could help :)

This archived topic is closed to new replies.