I am trying to get the value of a post_meta when the post is published. The problem is that all I can get is the post ID, but the post_meta must not yet be in the database when I make the query. I do not know to get this hook to fire after all of the post_meta for the post has been saved:

function get_some_meta($post) {
    $feat_img = get_post_meta($post->ID, 'feat_img', true); // This has not yet been saved, so I can not retrieve it...
    // Do something with $feat_img...   
add_action('save_post', 'get_some_meta', 11, 1);

Read more here: WordPress accessing post_meta on save


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

Related Wordpress search:

, , ,

Wordpress related questions and answers: