Support » Plugin: List category posts » Cannot count the number of Japanese excerpt words

  • Hi,

    Does this plugin not support count the number of Japanese words to display from the excerpt? I want to show the limited excerpt Japanese words but it only works with English.

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Hi
    That can do edit function.php and add code

    
    //投稿一覧表示
    //
    //List-Category-Posts
    //抜粋の修正 280を変更
    //Edit excerpt change the numeric 280
    // https://mybag.work/web/listcategoryposts.html
    add_filter('the_excerpt', 'my_the_excerpt');
    function my_the_excerpt($postContent) {
        $postContent = mb_strimwidth($postContent, 0, 280, "…","UTF-8");
        return $postContent;
    }
    
    • This reply was modified 1 year, 4 months ago by genepine.
Viewing 1 replies (of 1 total)
  • The topic ‘Cannot count the number of Japanese excerpt words’ is closed to new replies.