• Resolved arabwoman

    (@arabwoman)


    Hello Yoast Support Team,

    I can’t get the category’s meta description,

    I could get the category’s meta title by using the following function:

    get_term( get_queried_object_id(), '_yoast_wpseo_title', true)
    

    But I can’t get the category’s meta description by using the same function:

    get_term( get_queried_object_id(), '_yoast_wpseo_metadesc', true)
    

    Because it causes an error: “Object of class WP_Error could not be converted to string”

    Please make sure to simplify the answer as possible as I’m not a PHP developer.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Can’t get category’s meta description’ is closed to new replies.