Leo
(@leohsiang)
Hi there,
Are you using GP Premium? I assume so if you are seeing read more button option.
If that’s the case can you open a topic in our premium forum as we are not allowed to support premium features in this free forum.
https://generatepress.com/support/
It’s a WordPress rule.
Thanks!
Theme Author
Tom
(@edge22)
Pro version or free version, the read more link won’t appear if you’re using a custom excerpt.
You can add it like this:
add_filter( 'wp_trim_excerpt', function( $excerpt ) {
if ( has_excerpt() ) {
$excerpt = sprintf( '%1$s <a href="%2$s">%3$s</a>',
$excerpt,
get_permalink(),
'Read more'
);
}
return $excerpt;
} );
Let us know if that helps or not 🙂
Hi @edge22,
Above solution perfectly works.
Thank you so much for your support.
Cheers..! 🙂
Hello, I’m facing the same problem. Where should i add the code ? to functions.php ?
Edit : Added this in functions.php but the site is just showing the text/button when added the code not the content
-
This reply was modified 7 years, 1 month ago by
Shafiuddin.
Theme Author
Tom
(@edge22)
Hi there,
I’m not too sure what you mean – can you show me?
Means the excerpts and not being shown, only the button that i added using the code provided in GeneratePress Documentation is being shown.
http://prntscr.com/n0tcjo
Theme Author
Tom
(@edge22)
Hmm, that code definitely shouldn’t do that. Does it happen with all other plugins deactivated?
Can you link me to your site?