In my plugin, I’m trying to retrieve Yoast’s post meta when the post is saved for the first time or updated.

get_post_meta doesn’t work, as I have read in some other articles that post meta is saved after the post.

My question is how do I get the post meta during save_post action?

I tried the following, but no luck:

$fb_meta_title = get_post_meta($ID, '_yoast_wpseo_opengraph-title', true);


if ($fb_meta_title==''){ $fb_meta_title = $_POST['yoast_wpseo_opengraph-title']; }

Read more here: How to get Yoast post meta during save_post


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: