$post->ID incorrect within meta box

Use the global variable $post. It is not specific to the Metabox, which is really just a portal for display.

 global $post;
 $PostId     = $post->ID;   

Leave a Comment