Including comments meta box on a plugin page

You can also use add_meta_box to add predefined boxes to different places in the admin, as long as you know the right handles. In the case of the comments meta box you need: add_meta_box(‘commentsdiv’, __(‘Comments’), ‘post_comment_meta_box’, $screen, ‘normal’); Here post_comments_meta_box is the callback function that fills the metabox. I am supposing your plugin is setting … Read more

Show meta box only when post is being published first time

I haven’t tested this but the idea is to check the post status, if the post is not published, show the metabox otherwise don’t. function non_publish_metaboxes() { global $post; if(!isset($post)) return; if($post->post_status !== ‘publish’){ // … Show Metabox } } add_action( ‘add_meta_boxes’, ‘non_publish_metaboxes’ );