"Read more" link on Featured Posts
URL to the page in question:
www.ripples2waves.org
-
Hi Bill –
I just added the Featured Posts widget to our home page and it correctly shows the title and excerpt but it isn’t showing the “Read more” link to get to the blog post itself. I can see code in the widget-posts.php that looks like this:
if ( ! empty( $instance['show_content'] ) ) {
if ( 'excerpt' == $instance['show_content'] )
the_excerpt();
elseif ( 'content-limit' == $instance['show_content'] )
the_content_limit( (int) $instance['content_limit'], esc_html( $instance['more_text'] ) );
else
the_content( esc_html( $instance['more_text'] ) );
}
but it doesn’t look like the ‘more_text’ is working or I’m looking in completely the wrong place. Thanks for your help.
Hello Laura,
Sorry for the trouble there. I just published a minor update to the theme that should take care of that for you. It should be in your dashboard shortly. WordPress 3.8 required moving two lines of code in the widget. Technically WordPress does not support the “more” tag when used on a page. The two lines let that happen, but needed to be relocated in the widget.
If you run into any trouble after updating, let me know.
Thanks,
Bill
Thanks, Bill.
This now shows the “more” link but it also shows the entire content of the blog post even though I have selected “Excerpt” in the widget. If I change the selection in the widget to “content” and limit the number of characters, it still shows the entire post. So I don’t think the widget is looking at the selection of what to show.
Please let me know what you think. Thanks.
Hmmm. That’s really puzzling. I use the same widget in six themes and this is the first one to have that reaction.
I’ll have to take a look at it a bit more and see if I can find the sticking point. As soon as I have a solution, I’ll let you know.
Hello Laura,
I did a bit more editing to it and it seems to be working now. Here’s how to change it on your site:
- Go to the Appearance section and select Edit.
- From the files on your right, choose widget-posts.php
- Replace everything in the file with this:
Make sure to copy that from the support site and not the notification email.
- Save your changes.
See if that doesn’t work a bit better. Sorry for the trouble there.
Bill
Bill –
Thanks. I can now see the excerpt and a “>” is the link to read more. Where is the text for “more-text” set? I’d like it to say “Read more” or something along those lines but right now it just has the “>”
Thanks!
Lara
There is a field in the widget labeled “More Text” that you can use to specify the text there (see attached screenshot). You may need to drag the widget out and add it back in if you don’t see it.
Let me know if you have questions.
- The topic ‘"Read more" link on Featured Posts’ is closed to new replies.