20

I read this question but it wasn't what I was looking for exactly. I'm new to Wordpress and a little confuse with the functions and everything.

How can I get the metadescription in the loop for each post?

Thanks !

closed as off-topic by birgire, Pieter Goosen, gmazzap, Johannes Pille, kaiser Sep 22 '14 at 20:12

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic." – birgire, Pieter Goosen, gmazzap, Johannes Pille, kaiser
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    In what way was it not what you were looking for exactly? – s_ha_dum Aug 25 '13 at 15:50
29

Add the following code in the archive template loop to display Yoast SEO meta description for each post.

echo get_post_meta(get_the_ID(), '_yoast_wpseo_metadesc', true); 

Not the answer you're looking for? Browse other questions tagged or ask your own question.