WordPress: Remove Default Dashboard Widgets

By default, the WordPress dashboard does look quite cluttered with too many widgets. You can of course add or remove the dashboard widgets manually, but this can be a pain if you manage a lot of sites. Also if you are building websites for clients the default widgets might be irrelevant or even confusing. The solution: remove them by default.

Just add the following code to your theme’s functions.php file and poof, the widgets are gone!

function remove_dashboard_widgets() {
	
	global $wp_meta_boxes; 

	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);	
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);	
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);	
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
	
	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']);
	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
	
}
add_action('wp_dashboard_setup', 'remove_dashboard_widgets');
Free Graphics, Icons, Tutorials
Free Graphics Free Christmas Vector Icon Graphics Pack 2017Free Fitness Vector Icons Graphics PackFree Camping Vector Graphics PackFree Summer Graphics PackFree File Icon PackFree Fast Food Vector Graphics
Sharing is caring...
Like & Follow
Share the love, share this page! Facebook Twitter Digg Reddit LinkedIn Pinterest Email
Close [X]
The Web Taylor
1000 Lakeside North Harbour Portsmouth, Hampshire PO6 3EN
02392 123358