-
humbleit
Is it possible to make all text clickable in the Blog or maybe insert a button?
https://www.supermacservice.dk/blog/
Thank you
-
Hi there,
are you using Custom Excerpts on the posts ?
If so – see here about adding the Read More Button:https://docs.generatepress.com/article/activating-read-custom-excerpt/
Let me know
-
humbleit
Hi david
Thank you for responding.
Yes i am using custom excerpts. Could you please help me we to place this snippet code?
Thanks
-
So choose the text or the button code version.
And this doc explains how to add it to the site:
-
humbleit
Seems to be working fine, but i believe i have done something wrong because now i have 2 buttons for each of the three posts on the frontpage: https://www.supermacservice.dk/.
I tried to figure out how to remove the black ‘Læs mere” button.
I can’t seem to find out how to do it.Could you please help
Thanks
-
Ah ok, the code needs to be conditional so it doesn’t affect static pages or the home page.
Try this:add_filter( 'wp_trim_excerpt', 'tu_excerpt_metabox_more' ); function tu_excerpt_metabox_more( $excerpt ) { $output = $excerpt; if ( has_excerpt() && ! is_front_page() && ! is_singular() ) { $output = sprintf( '%1$s <p class="read-more-button-container"><a class="button" href="%2$s">%3$s</a></p>', $excerpt, get_permalink(), __( 'Read more', 'generatepress' ) ); } return $output; }
-
humbleit
Great
Thanks David.
This is great
-
Glad to hear that
- You must be logged in to reply to this topic.