function remove_meta_box($id, $page, $context) {}

Remove a meta box from an edit form.


  • string $id: String for use in the ‘id’ attribute of tags.
  • string|object $screen: The screen on which to show the box (post, page, link).
  • string $context: The context within the page where the boxes should show (‘normal’, ‘advanced’).

Source code

function remove_meta_box($id, $page, $context) {

	global $wp_meta_boxes;

	if ( !isset($wp_meta_boxes) )

		$wp_meta_boxes = array();

	if ( !isset($wp_meta_boxes[$page]) )

		$wp_meta_boxes[$page] = array();

	if ( !isset($wp_meta_boxes[$page][$context]) )

		$wp_meta_boxes[$page][$context] = array();

	foreach ( array('high', 'core', 'default', 'low') as $priority )

		$wp_meta_boxes[$page][$context][$priority][$id] = false;



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: