How to Remove Miscellaneous Widgets From WP Dashboard

widgets-mainWhen you are logged into your WordPress dashboard, you may have noticed that there are many useless widgets that you don’t even bother looking at it, but it is taking up a long time to load. While you can hide them using the screen options, it is better to remove them for good and prevent them from taking up your precious load time.

Here is how you remove them:

In your functions.php, copy and paste the following code:

add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );
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']);
}

What the above code does is to unset the widgets from the dashboard array so that they won’t get loaded in the frontend. If you want to preserve any of the widgets, simply remove them from the above code. Continue reading How to Remove Miscellaneous Widgets From WP Dashboard