Support » Plugin: Yoast SEO » yoast_wpseo_metadesc on blog home page calls latest post’s meta description

  • Resolved sebastianew


    Hello everyone,

    I posted this in the general fixing wordpress forums before and was advised to take my problem here. So I’d be very happy if anyone could help.

    I have this line in the header.php which is meant to output my meta description (via Yoast plugin) as a kind of subtitle on the page. This is it:

    <p class=”site-description”><?php echo get_post_meta(get_the_ID(), ‘_yoast_wpseo_metadesc’, true); ?></p>

    It works as intended on all pages and blog posts, except one. On the blog home page (/blog/) something goes wrong. The meta description is what I actually defined and want to be the meta description. But the visible output on the page, produced with the above code, contains the meta description of the latest blog post instead of the blog home page’s one.

    Any help would be much appreciated, and thanks for reading!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • I´m having a similar issue, my meta description is messed up, contains tags, dates, even an attachement name. I don´t know how to fix it. Today they launched a plugin patch called Search Index Purge, did you installed it?

    Plugin Support Michael Tina


    You may want to check the meta description template under SEO > Search Appearance or the specific meta description you’ve set for that post or page in the Yoast SEO meta box.

    We can’t offer support on custom code (needed to change (core) features of our plugin). 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 Michael Tina


    No further response, setting to resolved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘yoast_wpseo_metadesc on blog home page calls latest post’s meta description’ is closed to new replies.