Archived topic
Wordsmith Library - READ MORE Button below the Excerpts
12 replies · Started by Ashwin on April 25, 2021
Hi,
I am using the Wordsmith library and building my blog. I want to add a READ MORE button below the excerpts like this https://contently.com/strategist/. I am not a CSS developer myself but can use any demo code. I see that the color of the button changes when I hover the mouse on it and that I can click/tap anywhere on the button.
Please help,
Thanks.
Hi there,
two things:
1. For the Wordsmith Blog page - go to Customizer > Layout > Blog and check the Display read more as button
2. For the Home Page Wordsmith uses the WP Show Post plugin - go to Dashboard > WP Show Posts and edit the post list, on the Content Tab and some text into the Read more text field
Thanks. But...
On #1, the READ MORE button appears only for the auto-generated excerpts. Not when I have written a custom excerpt in the post settings.
On #2, It works. How do I enable the excerpt for the homepage layout?
1. Add the PHP Snippet provided here:
https://docs.generatepress.com/article/activating-read-custom-excerpt/#read-more-button
2. Edit the WPSP list on the Content tab you can set the Content Type to Excerpt and below that the number of words to display.
Still having a few issues...
On #1, The Theme Editor suggests me not add PHP snippets as future updates may erase them. What is the recommended way by GP?
On #2, Custom Excerpts, even when configured in the WPSP list, do not show in the WordSmith library homepage.
Added code using Code Snippets plugin.
#2 does not show in homepage.
Hi there,
For #2.
If you set "Excerpt", the post list gets its excerpt from either, the manual excerpt you've written for the page OR it automatically makes an excerpt from your content but the length may vary if you're using a Read More block within the post content on some of the posts.
If your excerpt is completely blank, it's possible that your manual excerpt field contains a "space". Makes sure to remove that.
https://docs.generatepress.com/article/excerpt-issues/#excerpt-not-showing
Thanks. I did have the excerpt text, the issue was that it was not set in the WPSP. Marking as resolved.
Nice one. Glad you got it sorted. No problem. :)
Error in Code Snippets - Cannot redeclare function tu_excerpt_metabox_more
Error in Code Snippets – Cannot redeclare function tu_excerpt_metabox_more
That means you already have a function of that name declared on another code snippet. Look for it on the list of snippets and modify that instead of making a new one. (assuming you're using the same filter.)
Yes. Spot on. Thanks.
No problem. :D