"Read more" link on Featured Posts
Support Area › Forums › United › "Read more" link on Featured Posts
- This topic has 8 replies, 2 voices, and was last updated 12 years, 5 months ago by
Bill Robbins.
-
AuthorPosts
-
March 20, 2014 at 10:16 #18097
Lara Marsh
ParticipantHi 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.
March 20, 2014 at 11:31 #18100Bill Robbins
ParticipantHello 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,
BillMarch 20, 2014 at 12:09 #18105Lara Marsh
ParticipantThanks, 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.
March 20, 2014 at 12:29 #18108Bill Robbins
ParticipantHmmm. 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.
March 20, 2014 at 14:16 #18109Bill Robbins
ParticipantHello 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
March 20, 2014 at 14:55 #18110Lara Marsh
ParticipantBill –
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!
LaraMarch 20, 2014 at 15:00 #18111Bill Robbins
ParticipantThere 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.
March 20, 2014 at 15:02 #18113Lara Marsh
ParticipantExcellent! Thanks!
March 20, 2014 at 15:37 #18114Bill Robbins
ParticipantAnytime 🙂
-
AuthorPosts
- The topic ‘"Read more" link on Featured Posts’ is closed to new replies.

