Support

Account

Home Forums General Issues get_field inside action post_updated

Solved

get_field inside action post_updated

  • I’m trying to get field values of a post inside action ‘post_updated’, but with no luck. Any suggestions? My code looks like this:

    
    add_action('post_updated', function($post_id){
        
        if(wp_is_post_revision($post_id) || wp_is_post_autosave($post_id)){
            return;
        }
        
        $boxes = get_field('sidebar_boxes', $post_id);
        
    });
    
  • Sorry, field was empty, as a result I was getting ‘false’. Solved

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘get_field inside action post_updated’ is closed to new replies.