This tutorials helps WordPress developer to remove default meta boxes from WordPress admin panel. To be clarify these default meta boxes are shown in WordPress PAGE & POST types. So the function will work for them.
Open your functions.php file and just copy & paste your necessary remove_meta_box action that you would like to remove from POST or PAGE. Here i given different action hook for Post & Page.
REMOVE META BOXES FROM POSTS SCREEN:
// REMOVE META BOXES FROM DEFAULT POSTS SCREEN add_action('admin_menu','remove_default_post_screen_metaboxes'); function remove_default_post_screen_metaboxes() { remove_meta_box( 'postcustom','post','normal' ); // Custom Fields Metabox remove_meta_box( 'postexcerpt','post','normal' ); // Excerpt Metabox remove_meta_box( 'commentstatusdiv','post','normal' ); // Comments Metabox remove_meta_box( 'trackbacksdiv','post','normal' ); // Talkback Metabox remove_meta_box( 'slugdiv','post','normal' ); // Slug Metabox remove_meta_box( 'authordiv','post','normal' ); // Author Metabox }
REMOVE META BOXES FROM DEFAULT PAGES SCREEN:
// REMOVE META BOXES FROM DEFAULT PAGES SCREEN add_action('admin_menu','remove_default_page_screen_metaboxes'); function remove_default_page_screen_metaboxes() { remove_meta_box( 'postcustom','page','normal' ); // Custom Fields Metabox remove_meta_box( 'postexcerpt','page','normal' ); // Excerpt Metabox remove_meta_box( 'commentstatusdiv','page','normal' ); // Comments Metabox remove_meta_box( 'trackbacksdiv','page','normal' ); // Talkback Metabox remove_meta_box( 'slugdiv','page','normal' ); // Slug Metabox remove_meta_box( 'authordiv','page','normal' ); // Author Metabox }
Hope this hook function helps you if want remove any default meta boxes.
Thanks.
This post has already been read 4567 times!
What is Lead Capture: In general sense lead capture designates a process or way of…
Introduction Unlimited Modal POPUPS on MouseClick: Everyone knows about popup during site visits and most…
Brief about Pregnancy Calculator : This WordPress Pregnancy Calculator plugin allows users to display an…
Introduction About this Service Plugin: This Visual Composer Service Plugin works as an addon to…
Introduction of Dynamic Query String : This plugin allows user to set dynamic query string…
There is an occasional bug for iPhone and iPad even they are designed as well and…