Declutter WordPress: Remove widgets from the WordPress Dashboard

by Moises Kirsch

For most users the WordPress Dashboard can be overwhelming.

Recently I had to show a client how to add, remove and edit content using WordPress and as easy as it might seem, he was very confused with all the extra options that most users don’t understand or even use.

So I decided to hide must of the stuff and simplify the administration panel as much as possible. To accomplish this, I used a few tricks that I’ll be posting about in a series of posts.

The first page that any user sees after log-in in is the Dashboard. It is full with technical news, WordPress related stuff and things that a lawyer or a doctor wouldn’t understand and they don’t even care.

So the first thing that I did was to remove everything from that screen.

// Remove Dashboard Widgets
function remove_dashboard_widgets(){

// Globalize the metaboxes array that holds all the widgets for wp-admin
global $wp_meta_boxes;

// Unset the unwanted widgets
// unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
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', 'remove_dashboard_widgets');

You could even create an IF statement and only hide this from certain user role.