• Resolved vyshalina

    (@vyshalina)


    Hi. I want to display metadesc in my category’s pages like this:
    echo get_post_meta(get_the_ID(), ‘_yoast_wpseo_metadesc’, true);
    It works in posts, but doesn’t work in categories.
    In categories I write:

    $category = get_queried_object();
    $cat_id = $category->term_id;
    echo get_term_meta($cat_id, ‘_yoast_wpseo_metadesc’, true);
    How can I show metadesc in categories?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support devnihil

    (@devnihil)

    Unfortunately we can’t offer support on custom code. Since we don’t want to take the risk that we break your website by suggesting incorrect or incomplete code, we cannot advise you on how to make such changes. Maybe someone watching these forums can assist you further, but if your topic is inactive for 7 days, we’ll mark it as resolved to keep the overview.

    Thank you for your understanding.

    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 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display metadesc in category’ is closed to new replies.