Family Encyclopedia >> Electronics

How to Remove Default Widgets from Your WordPress Dashboard

As experienced WordPress developers, we've customized countless admin dashboards for clients to boost efficiency. Removing default widgets is a simple, effective way to declutter the interface and focus on what matters.

Note: If you're here to hide widgets just for your own account, see our beginner guide: How to Customize WordPress Admin Area (Dashboard) for Beginners.

Add this code to your active theme's functions.php file—or better, create a custom plugin to preserve it across theme updates.

function remove_dashboard_widgets() {
    global $wp_meta_boxes;

    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
}

add_action('wp_dashboard_setup', 'remove_dashboard_widgets');

The lines above target specific widgets—comment out any you wish to retain. Widget names are self-explanatory.

To remove widgets for all users except admins:

if (!current_user_can('manage_options')) {
    add_action('wp_dashboard_setup', 'remove_dashboard_widgets');
}

This snippet delivers a streamlined dashboard instantly. We've used it on production sites for years.