Support » Plugin: Yoast SEO » I wabt truncate length of meta description of category description

  • Resolved recensioneazienda

    (@recensioneazienda)


    Good morning, i use wordpress, yoast seo and woocommerce last versione.
    Is possible via yoast or a function, truncate length of meta description of category_description and category product of woocommerce? example
    I use variable %% category_description %% for the meta description but my description in category is too long. I want it to be cut after 160 characters. Excerpt no work on category e tag …
    thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Michael Tina

    (@mikes41720)

    Hi @recensioneazienda

    We do know that there is an assessment and a colored bar in the Yoast SEO meta box that lets you know if your SEO title and meta description are too long, too short, or just the right length.

    If the meta description is too long, it should show the truncated view in the Google preview in the Yoast SEO meta box.

    However, as to whether there’s a function or filter to cut off after a specified number of characters, there isn’t an option in the Yoast SEO plugin to do this. We recommend taking a look at your most important product categories and setting an individual meta description that would fit the correct length. It may take a bit of extra effort, but it is worth doing for your most important pages to ensure they display correctly in the search results.

    Otherwise, you can refer to our developer documentation if you want to make any custom changes to our plugin on your site — https://developer.yoast.com/

    Thread Starter recensioneazienda

    (@recensioneazienda)

    Hi Michael Tina,
    yes there is the colored bar that truncates the text but only in the Yoast preview, instead in the source code it is not cut. I cannot do it manually, I would like the text to be truncated by itself after 160 characters via a function and unfortunately I am not a developer

    Plugin Support Michael Tina

    (@mikes41720)

    Hi,

    Yes, the meta description code will show the full text that you have set, so we recommend you manually review this and set the appropriate meta description length. Again, as mentioned, it might take more effort, but it’s something you’ll have to do to optimize your product pages.

    Even if the meta description is longer than suggested, in most cases, Google will just cut off and show the truncated version anyway.

    As mentioned, we don’t have any sort of filter or variable that will specifically fit your needs to cut off the meta description at exactly 160 characters. We can only refer you to our developer documentation for you, should you decide to review and modify the default plugin output in a way that would suit your needs — https://developer.yoast.com/

    Thread Starter recensioneazienda

    (@recensioneazienda)

    but if i buy woocomerce seo yoast or ypast seo premium? I just need to fix this automatically for the rest of the plugin is great, but my client will never cut the meta description, and for google it is an error

    Plugin Support devnihil

    (@devnihil)

    @recensioneazienda We’re sorry but neither the Yoast SEO Premium nor WooCommerce SEO plugins include features like those that you are referring to.

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘I wabt truncate length of meta description of category description’ is closed to new replies.