• Resolved pierre1688

    (@pierre1688)


    Hi all,
    I added below codes into functions.php via child-theme to modify length of post excerpt.
    But Meta description field always got only 55 words. Even change the number to 20, the situation was still existed.

    May I have your any comments to resolve this issue?
    Thanks for huge help in advance!

    function mytheme_custom_excerpt_length( $length ) {
        return 100;
    }
    add_filter( 'excerpt_length', 'mytheme_custom_excerpt_length', 15 );
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @pierre1688,

    If you use the #post_content smart tag, then we truncate the description to 55 words as we’d otherwise be outputting the entire post content.

    If you use the #post_excerpt smart tag, then we will output the entire post excerpt without truncating it. However, if there is no post excerpt, we fall back to the post content and will truncate it as a result.

    That amount of 55 words is currently hardcoded, but it might not be a bad idea if we’d take that filter hook into account in the future.

    Thread Starter pierre1688

    (@pierre1688)

    Hi Arnaudbroes,
    Thanks for your comments. I will change another method to reach my request.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘About “post excerpt” words of tags under Meta Description?’ is closed to new replies.