Home Forums Total Missing triple dots "…" in preview of pages and posts

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #5590
    oscarnx
    Participant

    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!

    #5608
    Hash
    Keymaster

    It 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.

    #5618
    TickyNucker
    Participant

    I 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;
    }

    #5619
    Hash
    Keymaster

    Try 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;
    }

    #5845
    oscarnx
    Participant

    Thanks 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!

    #5899
    Hash
    Keymaster

    Sorry, that would not be possible without making a change in the code.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.