Support » Plugin: Yoast SEO » Missing field “description” for Recipes

  • Resolved evil


    Hi, after I update the Yoast plugin from 17.5 to 17.8
    I get a warning in the google search console “Missing field “description” for Recipes”

    I already set the Recipe type to the custom category in function.php

    add_filter('wpseo_schema_article', function($data)
    if (has_category(array(32,40), $post)) {
            $data['@type'] = "Recipe";
            class_exists('WPSEO_Frontend') && $data['description'] = wp_strip_all_tags(WPSEO_Frontend::get_instance()->metadesc(false), true);
       } }

    Rich Results Test:
    tested page:

    • This topic was modified 11 months ago by evil.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter evil


    I downgrade to 17.5 and it is ok now.

    Plugin Support Michael Tina


    Hi @p47ri0t

    Are you using that filter to add custom schema to the default Yoast SEO graph?

    While we can’t provide advice on custom code, we would like to refer you to our Schema API, if you would like to make any modifications and add or customize any graph pieces to address those warnings/errors you are receiving –

    Thread Starter evil


    The code was running well.Have you made any changes to newer versions? Can you check my code more closely?

    • This reply was modified 11 months ago by evil.
    Plugin Support Jeroen Rotty



    Yes, there was a deprecated WPSEO_Frontend class that was removed, but was today reïntroduced in 17.9. Can you please check if this works with 17.9? 🙂

    Thread Starter evil


    The problem seems to have been fixed. Thanks to the Yoast team for the follow-up🙏

    Plugin Support Jeroen Rotty


    Nice! Happy to hear it.

    Have a great day!

    Just to note: WPSEO_Frontend is deprecated, so please do update it going forward, you can find our developer documentation on

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Missing field “description” for Recipes’ is closed to new replies.