Disable dashboard widgets

WordPress Tutorial – Adding this first block of code to the functions.php of your wordpress theme will disable select widgets within your dashboard. Bellow is a list of widgets you can add to the list if you wish to disable them.

 

 

function remove_dashboard_widgets() {
global $wp_meta_boxes;
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
}
add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );

unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);

Be Sociable, Share!

Leave a comment