Community Forums › Forums › Archived Forums › General Discussion › Featured Posts Widget – Extra Character Before the Ellipsis and Read More link
Tagged: ellipsis
- This topic has 6 replies, 3 voices, and was last updated 7 years, 8 months ago by Victor Font.
-
AuthorPosts
-
July 7, 2016 at 12:40 pm #189044pagerankParticipant
I am using the Featured Posts widget. An extra character is appearing before the ellipsis and Read More link. On my dev site, the character is a period. On my live site, the character is a 'less than' symbol <
I have turned off every plugin and changed Genesis themes. The extra character is still there.
The Featured Posts widget has the following Content settings:
-
Show post title (checked)
Show post info (checked)
[post_date] By [post_author_posts_link]
Content Type: Show Content Limit
Limit Content to 0 characters
More Text: Read MoreI have added a function to removed the ellipsis (below). If this function is deactivated, the ellipsis returns, displayed between the new character and the Read More link.
http://greek-bonds.com/<?php add_filter( 'get_the_content_more_link', 'sp_read_more_link' ); function sp_read_more_link() { return '<a class="more-link" href="' . get_permalink() . '">View Book</a>'; } ?>
July 8, 2016 at 8:52 am #189117ChristophMemberHi,
since you disabled plugins and changed themes, I would check your widgets.
Lots of syntax errors could cause this.
A missing single or double quote, two << signs, a missing closing HTML tag </ >
July 8, 2016 at 11:57 am #189126pagerankParticipantHi Christoph,
Thanks for the suggestion. I've removed each widget. Unfortunately, that did not solve the problem. When I disable Genesis extender, the 'less than' symbols turn to different letters and $. Not sure if that helps.
Do any other suggestions come to mind?
Thanks,
ChrisJuly 8, 2016 at 12:31 pm #189128pagerankParticipantUpdate - I have tested this on another test site I just created. The same problem is happening. This is part of a subdomain multisite (w/ mapped domain), similar to the other test site. I have disabled all plugins and widgets except for Genesis Featured Post. I have changed Genesis themes and moved the widget to different locations. One interesting quirk is that the extra character shown is the first character of the post. I can now see that this is true for my other posts. Each starts with code (e.g. < )
July 8, 2016 at 3:13 pm #189155Victor FontModeratorSo I walked through the code until I found where the 1 character is coming from. The featured post widget eventually uses a function called genesis_truncate_phrase to return the content limit for the post. There is a line in that function that reads:
$text = mb_substr( $text, 0, $max_characters + 1 );
This adds 1 character to the length of the content-limit set in the featured posts widget. So even if you have the featured posts content limit set to 0, it will still show one character. The solution is to set the content limit in the featured posts widget to -1. This way when the function adds 1 character, it becomes 0. All you'll get is the read more.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?July 8, 2016 at 6:01 pm #189161pagerankParticipantVictor! You are the man! That solved the problem. Thank you to you and Christoph for the quick responses and help.
July 9, 2016 at 9:39 am #189187Victor FontModeratorI let Nathan Rice know of the Genesis FB page. Hopefully, he'll fix this in the next framework release.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet? -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.