Archived topic
"Read more" link after excerpt
10 replies · Started by Vincent on December 16, 2021
Hi,
I try to have "Read more" link in the continuity of the excerpt in Dispatch theme (WP show posts "standard") of my homepage
1/ In ‘Customizer > Blog > Blog Content’ I have Blog Post Content set to ‘Show Excerpt’, and the ‘Read More’ label set as ‘Read more’.
I manage to get a button but not a link after my excerpt.
2/ In WPSP the field "Read more text" is also filled by " Read more".
What I want is like in the screenshot hereafter :
Download what I'm looking for
Any idea ?
Hi Vincent,
Are you talking about the home page articles which inserted by WP show posts?
If so, you'll need to edit the WP show posts list, set the content to excerpt:
https://www.screencast.com/t/ymNa5SbMIy
If it doesn't work, can you link us to your site?
Let me know if I miss anything :)
Hi Ying,
Thanks for your answer.
Yes I'm talking about the home page articles which inserted by WP show posts :-)
I have previously try excatly your settings but that put a button and not a “Read more” text link in the continuity of the excerpt.
Our blog is in "coming soon mode so I'cant sent you the link.
However please find here after the resul of your settings and want I'm looking for :-)
Any Idea?
In this case, try the method here: https://wpshowposts.com/support/topic/read-more-link-instead-of-button/
Let me know :)
Thanks but how edit the function to add url ?
The URL in the link of the post doesn't works... :-)
The link should work, can you link me to the page?
The link should work, can you link me to the page?
What I try to explain is that in your previous sent link hereafter :
https://wpshowposts.com/support/topic/read-more-link-instead-of-button/
It’s indicated to use this function :
add_filter( 'wpsp_ellipses', function() {
return sprintf(
'...Read more',
get_permalink()
);
} );
but how edit the function to add url and remove the « Read More » button and just have a “Read more” text link straight after the excerpt like in my screenshot ?
I haven’t any edit function in my WPSP settings
1. Add this PHP snippet to your site, you don't need to change anything of the code.
Adding PHP: https://docs.generatepress.com/article/adding-php/
2. Go to Dashboard > WP show posts, empty theread more text field to remove the default read more button.
https://www.screencast.com/t/epW3mWLG
This code get_permalink() adds the post link to the read more link.
So I'm not sure what you mean by how edit the function to add url .
If the link doesn't work, can you link us to your site?
Perfect It’s works !
Thanks a lot for your help ;-)
You are welcome :)