Are you wanting to to remove the default meta boxes from the WordPress Dashboard

or remove meta boxes from particular posts or pages the WordPress functions below will do just that for you. Simply copy and paste the code below into you functions.php file located in your theme folder. Then make sure to customize the function as you see need.

Since everyone will a unique collection of dashboard widgets,  I cannot list them all. Although, if you have suggestions to improve the function please share your update in the comments below. The broad goal of this post is to have a community of WordPress Designers and WordPress Developers that can contribute to the refactoring of the code, providing everyone with a lightweight, finely tuned, WordPress function.

I’m absolutely sure you’re making something super bad ass and revolutionary so I hope this helps in your journey!

//Remove pre-defined dashboard widgets
if (is_admin()) :
function remove_dashboard_widgets(){
remove_meta_box(‘dashboard_right_now’, ‘dashboard’, ‘normal’); // Right Now
remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Recent Comments
remove_meta_box(‘dashboard_incoming_links’, ‘dashboard’, ‘normal’); // Incoming Links
remove_meta_box(‘dashboard_plugins’, ‘dashboard’, ‘normal’); // Plugins
remove_meta_box(‘dashboard_quick_press’, ‘dashboard’, ‘side’); // Quick Press
remove_meta_box(‘dashboard_recent_drafts’, ‘dashboard’, ‘side’); // Recent Drafts
remove_meta_box(‘dashboard_primary’, ‘dashboard’, ‘side’); // WordPress blog
remove_meta_box(‘dashboard_secondary’, ‘dashboard’, ‘side’); // Other WordPress News
remove_meta_box(‘pb_backupbuddy_stats’, ‘dashboard’, ‘normal’); // Other WordPress News
remove_meta_box(‘dashboard_stream_activity’, ‘dashboard’, ‘normal’); // Other WordPress News
remove_meta_box(‘dashboard_stream_activity’, ”, ‘normal’); // Other WordPress News
remove_meta_box(‘woocommerce_dashboard_status’, ”, ‘normal’); // Other WordPress News
remove_meta_box(‘woocommerce_dashboard_recent_reviews’, ”, ‘normal’); // Other WordPress News
// use ‘dashboard-network’ as the second parameter to remove widgets from a network dashboard.
add_action(‘wp_dashboard_setup’, ‘remove_dashboard_widgets’);

//Remove pre-defined meta boxes from pages and post
if (is_admin()) :
function srh_remove_meta_boxes() {
if( !current_user_can(‘manage_options’) ) {
//remove_meta_box(‘linktargetdiv’, ‘link’, ‘normal’);
//remove_meta_box(‘linkxfndiv’, ‘link’, ‘normal’);
//remove_meta_box(‘linkadvanceddiv’, ‘link’, ‘normal’);
remove_meta_box(‘postexcerpt’, ‘post’, ‘normal’);
remove_meta_box(‘trackbacksdiv’, ‘post’, ‘normal’);
remove_meta_box(‘postcustom’, ‘post’, ‘normal’);
remove_meta_box(‘commentstatusdiv’, ‘post’, ‘normal’);
remove_meta_box(‘commentsdiv’, ‘post’, ‘normal’);
remove_meta_box(‘revisionsdiv’, ‘post’, ‘normal’);
remove_meta_box(‘authordiv’, ‘post’, ‘normal’);
remove_meta_box(‘authordiv’, ‘page’, ‘normal’);
remove_meta_box(‘sqpt-meta-tags’, ‘post’, ‘normal’);
remove_meta_box(‘woothemes-settings’, ‘testimonial’, ‘normal’);
remove_meta_box(‘woothemes-settings’, ‘projects’, ‘normal’);
remove_meta_box(‘woothemes-settings’, ‘slides’, ‘normal’);
add_action( ‘admin_menu’, ‘srh_remove_meta_boxes’ );