We're merging with GenerateBlocks! Learn more here.

Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Displaying read more button with read more tag Reply To: Displaying read more button with read more tag

#5423
Tom
Keymaster

Hey Janek,

You should be able to:

1. Turn off the default read more button.

2. Add this function:

add_filter( 'the_content_more_link', 'tu_wpsp_content_more', 15 );
function tu_wpsp_content_more( $more ) {
	return sprintf( '<div class="wpsp-read-more"><a title="%1$s" class="read-more content-read-more" href="%2$s">%3$s%4$s</a></div>',
		the_title_attribute( 'echo=0' ),
		esc_url( get_permalink( get_the_ID() ) ),
		'Read more',
		'<span class="screen-reader-text">' . get_the_title() . '</span>'
	);
}

Let me know if this works or not 🙂