Best way to Remove Default WordPress Meta Boxes

Add Tool

Remove Default WordPress Meta Boxes


Remove Default WordPress Meta Boxes

Someone wants to delete or remove default WordPress meta boxes from their web site. To remove the default WordPress Meta Boxes simply add the following codes in your theme’s functions.php file. This codes will delete automatically WordPress default Meta boxes from WordPress default post screen and default pages screen.

<?php
// REMOVE META BOXES FROM DEFAULT POSTS SCREEN
  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
  }
    add_action('admin_menu','remove_default_post_screen_metaboxes');

 // REMOVE META BOXES FROM DEFAULT PAGES SCREEN
    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
  }
    add_action('admin_menu','remove_default_page_screen_metaboxes');
?>

Here we add some Meta box information under comment. If you want to delete all Meta boxes , you should use all the above codes. If you want to delete some specific default WordPress Meta Boxes, add only those files.


Tags: create custom meta boxes in wordpress, custom metaboxes repeatable, custom metaboxes show_on, wordpress meta box, Remove WordPress Meta Boxes
Payza

About Masum Billah

Remove Default WordPress Meta Boxes 1stWebSuite website seo tool is a free website ranking tool site provides a lot of on page and off page seo useful tools for you. On this site, we have a large number of website ranking tools


SIGN UP TO GET UPDATE TO YOUR INBOX




Discuss about: Best way to Remove Default WordPress Meta Boxes


adf.ly