Every time you login to WordPress you are taken to the dashboard and are greeted with a whole bunch of widgets. In some cases, these widgets can be quite handy but most of the time they are just plain annoying. Fortunately, you can hide them, however you can also remove them completely.

WordPress has the built-in ‘Screen Options’ button at the top right of each screen which allows you to customise most screens, including the dashboard. This is fine, however there are some items you may want to remove completely. If you are using WordPress as Content Management System (CMS) for your clients then this is quite often the case.

Hang on, how do I just hide them?

If there are widgets that you want to hide, but you may use again later, simply click the ‘Screen Options’ button at the top right of the WordPress screen. This will cause a panel to slide down where you can tick to hide and show widgets/items.

How do I remove them?

To remove widgets completely, it is a little bit trickier. The code below can be added to the functions.php file within your WordPress theme. From there you can use the remove_meta_box() functions for the items that you would like to prevent from running.

add_action('admin_init', 'clear_wp_dashboard');
 
function clear_wp_dashboard() {
	remove_meta_box('dashboard_right_now', 'dashboard', 'normal');   	// right now
	remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); 	// recent comments
	remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal');  	// incoming links
	remove_meta_box('dashboard_plugins', 'dashboard', 'normal');   		// plugins
	remove_meta_box('dashboard_quick_press', 'dashboard', 'normal');  	// quick press
	remove_meta_box('dashboard_recent_drafts', 'dashboard', 'normal');      // recent drafts
	remove_meta_box('dashboard_primary', 'dashboard', 'normal');   		// wordpress blog
	remove_meta_box('dashboard_secondary', 'dashboard', 'normal');   	// other wordpress news
	remove_meta_box('dashboard_activity', 'dashboard', 'normal');		// activity
	remove_action( 'welcome_panel', 'wp_welcome_panel' );			// welcome panel
}