• Resolved kylie12

    (@kylie12)


    How to limit excerpt length?
    I found that the post has more than 155 words, and the content cannot be displayed by default SEO

    There is a way to use the code, let yoast seo Only 150 words displayed? Even though POST has 400 words,no need to modify the length of the post content, but let yoast seo only display 150 words

Viewing 15 replies - 1 through 15 (of 32 total)
  • Plugin Support Suwash

    (@suascat_wp)

    @kylie12

    We assumed you’re talking about controlling the meta description length that’s shown in Yoast SEO snippet preview.

    The meta description is a snippet of up to about 155 characters – a tag in HTML – which summarizes a page’s content. Search engines show it in search results mostly when the searched-for phrase is within the description. So optimizing it is crucial for on-page SEO.

    Although it’s great to keep it short, it’s hard to say something substantial about your page in less than 120 characters, that’s why we do have a minimum length too!

    For more information, please refer: https://yoast.com/meta-descriptions/

    Thread Starter kylie12

    (@kylie12)

    Sorry I don’t feel like I’m getting my point across. I’m not talking about controlling the meta description length that’s shown in Yoast SEO

    I have preset the SEO meta description display mode of each post like this
    %%title%%|%%excerpt%%

    but when the post content exceeds 155 characters, only %%Title%%%| will be displayed on SEO Meta description. cannot display %%excerpt%%
    There are too many post. I can’t change all post descriptions to 155 characters. or customize SEO Meta description for each post.

    So I asked if I could use the “functions.php” code to let %%exerpt%% no matter how many characters there are in the post, extract only the first 155 characters. or 120 I can change it freely within 155 characters.

    I’m not going to cancel the Yoast SEO limit of 155 characters, because I know that GOOGLE has changed the number of characters in the description

    Instead,I want let yoast SEO description >%%exerpt%%< force to extract only the first 155 characters of post content. Do you know what I mean? thanks.

    • This reply was modified 2 years, 9 months ago by kylie12.
    • This reply was modified 2 years, 9 months ago by James Huff.
    Plugin Support Michael Tiña

    (@mikes41720)

    Hi @kylie12

    There’s currently no way to limit the %%excerpt%% variable to just 155 characters.

    That will require custom code, which is, outside our scope of support. However, you can refer to our developer documentation, and modify the plugin in a way that would best suit your needs – https://developer.yoast.com/

    You can also check out all of our available snippet variables here to see which would best suit your needs – https://yoast.com/help/list-available-snippet-variables-yoast-seo/

    Just as a side note, if the excerpt field is empty, WordPress should automatically generate it with the first 55 words of the post – https://wordpress.org/support/article/excerpt/

    • This reply was modified 2 years, 9 months ago by Michael Tiña.
    Thread Starter kylie12

    (@kylie12)

    But this will lead to all my content description is not complete, I tested All in one SEO and did not have this problem

    Although the meta description over 300 characters

    Search in Google will automatically intercept 150 characters , will not show all, and will not cause the description to disappear

    I think it seems to be a bug Have you checked?

    Plugin Support Michael Tiña

    (@mikes41720)

    Hi @kylie12

    If your meta description is too long, it doesn’t mean that it won’t output anymore, it’s just that there is a chance that it will be cut off in the search results, instead of showing the full result.

    This is why we have a meta description length assessment in the Yoast SEO meta box, which will let you know if it’s too short, just right, or too long, so that you can make adjustments accordingly. We recommend individually optimizing your meta descriptions, especially for your most important articles. You can learn more about it here – https://yoast.com/meta-descriptions/#length-assesment

    Thread Starter kylie12

    (@kylie12)

    yeah I think so, too But my current situation is when %%exercise%% Meta Description is too long

    It will disappear completely. When I go to Google, only my set%%% Title%%% will be displayed

    That’s where I’m confused The description becomes very short, only the title
    After that, I repeatedly tested that English would not have this problem, But other languages have this problem

    Please see the demo picture:

    1.https://prnt.sc/1ds2cne (Within 155 characters) Japanese
    2.https://prnt.sc/1ds33rf (over 155 characters) Japanese

    It’s obviously a bug

    English doesn’t have this problem, although more than 325 words will still appear in Excel, as you said
    picture:https://prnt.sc/1ds4niw

    Then I Google translation other languages. More than 155 characters. Description will disappear completely
    Korea Language. Thai Language. Chinese Language.

    Yoast SEO Version 14.9
    Please help me fix this problem Thanks!

    BTW The latest version of Yoast has the same problem

    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    Thanks for clarifying everything. Based on the information you provided, we believe it’s a bug. We recommend you please submit a proper bug report directly at our GitHub development repository so we could investigate this further.

    Thread Starter kylie12

    (@kylie12)

    I have to go to github before you can deal with this problem? Because I can only use the old version, if you have any code or update, please help the old version to also fix this problem thanks

    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    Since you mentioned it’s a bug, we invited you to submit a proper bug report directly at our GitHub development repository. We actively monitor bug reports on our GitHub development repository rather than on the public forum.

    We recommend you submit the proper bug report on the right channel so that our production support team and as well as our development team can investigate this further at this point.

    Thread Starter kylie12

    (@kylie12)

    Plugin Support Michael Tiña

    (@mikes41720)

    Hi @kylie12

    If you’ve followed the steps and provided all the information as written here, then that should be okay. You’ve mentioned that you’ve tested this with the latest version of Yoast SEO v16.7, and the issue still occurs. One of our developers will be able to take a look at the issue and provide feedback.

    Just as a side note, you wrote %%exercise%%, but you probably meant %%excerpt%%. You may want to edit that.

    Thread Starter kylie12

    (@kylie12)

    Okay, please solve it as soon as possible because I checked 80% of my post without excerpt. This will affect my SEO ranking

    Plugin Support Michael Tiña

    (@mikes41720)

    Hi @kylie12

    Please understand we cannot provide support for older versions of our plugin, so if this issue occurs with v15.2 of the Yoast SEO plugin, we won’t be able to help.

    With that being said, we tried this on a test site with a default TwentyTwenty WP theme and only Yoast SEO v16.7 as the plugin enabled. We then set the site language to Korean. Then we created a test post, used the %%excerpt%% variable and made sure to use more than 155 characters, and both the Google Preview and the meta description in the page source of the test post showed the excerpt as expected – https://snipboard.io/36nzPo.jpg

    So we were unable to reproduce this issue. Please make sure that this occurs when doing a conflict check (having only a default WP theme and only Yoast SEO as the plugin enabled) – https://yoast.com/help/how-to-check-for-plugin-conflicts/ and see if you are still able to reproduce it, if so, please edit and add that information to your bug report.

    Thread Starter kylie12

    (@kylie12)

    I used the brand new wordpress 5.7.2 test At the same time I also test on my main website (Install only the yoast plugin)
    The problem can still be reproduced
    https://prnt.sc/1g5ol8z
    https://prnt.sc/1g5sr4g

    and my github post has been closed and moved to another post
    my post:
    https://github.com/Yoast/wordpress-seo/issues/17268

    another:
    https://github.com/Yoast/wordpress-seo/issues/17116
    https://github.com/Yoast/wordpress-seo/pull/17146

    I am not the only one who raised this issue, it has not been resolved yet.

    • This reply was modified 2 years, 9 months ago by kylie12.
    • This reply was modified 2 years, 9 months ago by kylie12.
    • This reply was modified 2 years, 9 months ago by kylie12.
    Plugin Support Michael Tiña

    (@mikes41720)

    Hi @kylie12

    When following the instructions in this GitHub issue, we were able to replicate the issue that the meta description wouldn’t output on the frontend. Since our developers have mentioned that the issue you’ve opened is a duplicate of the other one and have closed it.

    We’ll be closing this forum thread, please do subscribe to the open issue for updates. Thank you!

Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘How to limit excerpt length?’ is closed to new replies.