Remove WP-Admin Dashboard Widgets

Topic WordPress, Development
Access WP-Admin, FTP

Clean up WordPress’ admin dashboard quickly with just a few lines of code.

If you’re looking for a cleaner appearance upon logging into WordPress, whether you’re OCD and hyper-organized, or you don’t want your clients to see a bunch of garbage forced upon us by plugins, themes, and WordPress itself, the good news is you can remove the dashboard widgets quite easily.

Note: You can also turn the widgets off by using the “Screen Options”  tab, but that’ll only work for your login. You’ll want to utilize this code to ensure other users aren’t bombarded with the mess you’re trying to hide.

First let’s take a look at what a WP-Admin can look like with a little care. We skin all of our site’s WP-Admin and remove most everything by default. If they’re on a fully-managed development service we also remove the update nags and get all of our notifications through a 3rd party app. This allows clients to operate their website without the burden of widget and nag chaos. It’s important to note that we do not use any WP-Admin theme plugins. We have a baseline child-theme with a handful of functions to baseline the clean dashboard and register a CSS override file so we can apply light styling to the WP-Admin.

If you’re thinking this is a far cry from what your dashboard looks like, we’ll help you get started right now with dumping those dashboard widgets!

Go ahead and open your theme or child theme’s functions.php file and add the following code

//Disable Default Dashboard Widgets
function remove_dashboard_meta() {
    remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); //Removes the 'incoming links' widget
    remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); //Removes the 'plugins' widget
    remove_meta_box('dashboard_primary', 'dashboard', 'normal'); //Removes the 'WordPress News' widget
    remove_meta_box('dashboard_secondary', 'dashboard', 'normal'); //Removes the secondary widget
    remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); //Removes the 'Quick Draft' widget
    remove_meta_box('dashboard_recent_drafts', 'dashboard', 'side'); //Removes the 'Recent Drafts' widget
    remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); //Removes the 'Activity' widget
    remove_meta_box('dashboard_right_now', 'dashboard', 'normal'); //Removes the 'At a Glance' widget
    remove_meta_box('dashboard_activity', 'dashboard', 'normal'); //Removes the 'Activity' widget (since 3.8)
    remove_meta_box('rg_forms_dashboard', 'dashboard', 'normal'); //Removes the 'Activity' widget (since 3.8)
    remove_action('admin_notices', 'update_nag');
add_action('admin_init', 'remove_dashboard_meta');

Save your file and refresh WP-Admin and you should instantly feel a drop in anxiety!



Quick Open Ticket

You can quickly open a ticket without logging in. Be sure to use your login email address and include the web address of your service.