Site logo

Archived topic

Can’t change Read more text for blog

5 replies · Started by Bill on November 2, 2022

Viewing posts 1–6 of 6

Hi there! I changed the ‘read text’ label in Layout>blog but it does not show on the blog page. The buttons still say ‘read more’. I turned off perfmatters and Autoptimize on that page, but still does not work.

Thanks!

Bill

Hi Bill,

Are there custom functions added with regards to the read more tag?

Have you tried disabling all plugins except GP Premium to test?

Let me know :)

Hi Leo,

I have this code snippet. I removed it and now there is no button or text.

add_filter( 'wp_trim_excerpt', 'tu_excerpt_metabox_more' );
2
function tu_excerpt_metabox_more( $excerpt ) {
3
$output = $excerpt;
4

5
if ( has_excerpt() ) {
6
$output = sprintf( '%1$s <p class="read-more-button-container">%3$s</p>',
7
$excerpt,
8
get_permalink(),
9
__( 'Read more', 'generatepress' )
10
);
11
}
12

13
return $output;
14
}

Can you try editing the Read more text in that function?

Yes, that worked. Thanks 🙏

No problem :)

This archived topic is closed to new replies.