When you log in to your WordPress blog you are automatically redirected to the Dashboard area - an area displaying various widgets, each containing useful information such as Right Now, Recent Comments and Incoming Links to name a few. What if you wanted to disable some or all of them?
One option is to click the Screen Options button at the top of the page which reveals all available dashboard widgets, each with a nifty check box beside its name. Simply unchecking the appropriate box will hide the widget from your Dashboard. To re-enable it tick the box. See screen shot below. (click image to enlarge)
But what if, for some reason, you want to completely disable one or more widgets as opposed to hiding them? Sure you can do so by hacking core files but this is not recommended. A better option is to add a bit of code to your theme's functions.php file.
First, let's take a look at what the Codex has to say about Dashboard Widgets. Here are the names of the meta boxes on the dashboard:
Main column
$wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']
$wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']
$wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']
$wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']
Side Column
$wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']
$wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']
$wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']
$wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']
To remove select items we will manually unset() their items from the general $wp_meta_box array via the theme's functions.php file.
Using the example provided by the Codex, to remove the quickpress and incoming_links widgets, add the following to your theme's functions.php file,
// 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;
// Remove the quickpress widget
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
// Remove the incomming links widget
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
}
// Hoook into the 'wp_dashboard_setup' action to register our function
add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );
Look at the above carefully. Recall that the meta box for the quick_press widget is...
$wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']
See how we manually remove it via unset() as such...
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
You can follow this example to disable each of the widgets. In a local install I disabled all dashboard widgets. See the screen shot below. (click image to enlarge)
I accomplished this by making use of the info earlier in this post then by adding the following to my theme's functions.php file...
// 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;
// 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 wordpress dev blog widget
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
// Remove the other wp news widget
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
// Remove the incomming links widget
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
// Remove the dashboard 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 plugins widget
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
}
// Hoook into the 'wp_dashboard_setup' action to register our function
add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );
To re-enable any of the widgets simply remove the appropriate code from the functions.php file. To re-enable all of them remove all of the code.
Further reading: http://codex.wordpress.org/Dashboard_Widgets_API



PERFECT. This was hard to find but worth it. It's a perfect fix. However I have one thing I can't figure out -- how can I remove the Yoast widget -- I've tried everything, I can't stand it. Any help?
Hi Tanner.
"... how can I remove the Yoast widget ..."
A very good question. I'm not familiar with that widget but I'll have a look at it.
Hi Tanner,
Where does this widget come from? Is it part of a theme?
It's actually on the main dashboard and seems to COME with WordPress 3.0.
I'm running WordPress 3.0.1 and don't have any such widget. My guess is it's the theme you're using. It must have it coded in the functions.php file.
No, it's not a theme - it's a particularly powerful plugin - which is great and wonderful and all and I'm very grateful to the author, but I too would like to remove the whopping great advert widget as I don't need every one of my clients to have it take up so much screen real estate!
It does seem impervious to most of the dashboard management plugins, and to the functions.php edits outlined above. I'm guessing it's not a $wp_meta_box, but maybe uses some sort of pseudo-metabox?!
Anyway, it would be great if you can shed any light,
thanks,
Adrian
Sorry, that comment is regarding the Yoast widget and should have been threaded - apologies
Re my earlier comment (about the v useful but slightly too 'in your face' Yoast SEO widget) - I wasn't able to use the plug-in listed here - http://wordpress.org/extend/plugins/yoast-remove/ - but by placing the relevant code from that directly into the functions file - bingo!
If Joost is reading this - no offence, it's only that the widget is _too_ prominent.
Glad to see you have it all sorted out Adrian.
Thanks, great article. This will come in handy. Does it work with the latest version of WordPress?
Hi Jason,
It sure does. I tested it to make certain.
thanks for sharing will try this one on my site.
I haven't looked at this in ages. Let me know how it works.