X

Disable dashboard widgets

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']);

Comments  Leave a Reply

  1. Hi, thanks for this snippet. :)Wondering if there is any way to disable the screen uptions for non admins and  not just hiding it?

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!