Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
See Post Related Meta in a side metabox
* Show Post Meta in a metabox
add_action( 'add_meta_boxes', 'wpdocs_register_meta_boxes' );
function wpdocs_register_meta_boxes() {
'Information Box',
'sb-people-listing', // Change the post-type here.
function display_post_meta_data_callback(){
// global $post;
// $post_id = $post->ID;
echo '<pre>';
var_dump( get_post_meta(get_the_ID()) );
echo '</pre>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment