WordPress.org

Ready to get started?Download WordPress

Forums

Network Latest Posts
[resolved] strange UTF-8 characters in excert (2 posts)

  1. sergeyzimin
    Member
    Posted 1 year ago #

    When the last word in excerpt is cut a strange UTF-8 character appears at the end of excerpt.
    Fix (only whole words in excerpt):

    function custom_excerpt($count,$content,$permalink){
    if($count == 0 || $count == 'null') {
    return $content;
    } else {
    $content = strip_tags($content);
    $content = substr($content, 0, $count);
    $words = explode(' ', $content);
    array_pop($words);
    $content = implode(' ', $words);
    return $content.'... '.__('more').'';
    }
    }

    http://wordpress.org/extend/plugins/network-latest-posts/

  2. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Sergey,

    Thanks for your feedback, I'm patching the function with your code. This will be included in the next release.

    Cheers.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.