Site logo

Archived topic

'Read More' even if excerpt fully displayed

3 replies · Started by Eric on September 3, 2017

Viewing posts 1–4 of 4

Hi Tom and all,
I would like the "Read More" link to be displayed even if excerpt fully displayed in the "Blog Content".
How could I do that?
Any help will be quite appreciated
Thank you
Eric

Hi there,

First, make sure your Read more label option is empty in your Blog options.

Then try this PHP:

add_action( 'generate_after_entry_content', 'tu_constant_read_more' );
function tu_constant_read_more() {
    if ( ! is_singular() ) {
        printf( ' ... <a title="%1$s" class="read-more" href="%2$s">%3$s</a>',
		the_title_attribute( 'echo=0' ),
		esc_url( get_permalink( get_the_ID() ) ),
		__( 'Read more', 'generatepress' )
	);
    }
}

_/\_ Thank you so much Tom!

You're welcome :)

This archived topic is closed to new replies.