- This topic has 5 replies, 3 voices, and was last updated 6 years, 1 month ago by Hash.
- AuthorPosts
- May 5, 2018 at 1:29 pm #5590oscarnxParticipant
Hi!
For some reason, all the sections which show preview of the target context (text) is cropping the text without introducing the classic “…” in the end. This looks really bad and is misleading to the user.
This problem exist on all sections which reference pages or posts. For examples, please see the live site on http://brfpalatinen.se/.
If anyone could help me troubleshoot this I would very much appreciate it!
Thanks in advance!
May 6, 2018 at 7:22 pm #5608HashKeymasterIt should display … at the end as you can see in our website as well. Did you make any changes in the code? If not, please email us your website login detail to support@hashthemes.com if you want our team to check and fix it.
We would not be able to tell any thing without checking the code.
May 7, 2018 at 2:06 pm #5618TickyNuckerParticipantI added this code to my child themes functions.php:
function total_excerpt( $content , $letter_count ){
$content = strip_shortcodes( $content );
$content = strip_tags( $content );
$content = mb_substr( $content, 0 , $letter_count );if( strlen( $content ) >= $letter_count ){
$content .= “…”;
}
return $content;
}May 8, 2018 at 12:15 am #5619HashKeymasterTry replacing it with this one. It will work.
function total_excerpt( $content , $letter_count ){
$content = strip_shortcodes( $content );
$content = strip_tags( $content );
$content = mb_substr( $content, 0 , $letter_count );
$content .= “…”;return $content;
}May 13, 2018 at 3:20 pm #5845oscarnxParticipantThanks a lot for the support both in forum and in troubleshooting my site! I now got the triple dots back! 🙂
However, if it would be possible to make the cropping of the test remove the entire last word and introduce the triple dots after the end word, that would be even better! 🙂
Again, thanks for the support!
May 14, 2018 at 8:52 pm #5899HashKeymasterSorry, that would not be possible without making a change in the code.
- AuthorPosts
- You must be logged in to reply to this topic.