Hiding Default WordPress Dashboard Panels
When you first install an instance of WordPress there are a set of default modules that are displayed on the dashboard within the administration area. Often times client, or even developers themselves, have no use for some of them. Instead of changing the settings for each individual user, why not use the following in your theme’s functions.php file, this will remove all specified modules from every user that is currently in the system, as well as any new users that will be created over time.
Note: all available dashboard modules have been added to the following example, to customize it to suit your needs simply remove the items to wish to remain visible.
/ Create the function to use in the action hook
function example_remove_dashboard_widgets() {
// Globalize the metaboxes array, this holds all the widgets for wp-admin
global $wp_meta_boxes;
// Main Modules
// Remove the right now widget
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
// Remove the recent comments widget
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
// Remove the incoming links widget
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
// Remove the plugins widget
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
// Secondary Modules
// Remove the quickpress widget
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
// Remove the recent drafts widget
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);
// Remove the primary feed widget
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
// Remove the secondary feed widget
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
}
// Hoook into the 'wp_dashboard_setup' action to register our function
add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );