Skip to content

Instantly share code, notes, and snippets.

@jkudish
Created September 18, 2011 21:38
Show Gist options
  • Save jkudish/1225586 to your computer and use it in GitHub Desktop.
Save jkudish/1225586 to your computer and use it in GitHub Desktop.
WordPress remove core dashboard widgets
<?php
add_action('wp_dashboard_setup', 'rm_dashboard_widgets');
function rm_dashboard_widgets() {
global $wp_meta_boxes;
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); // right now [content, discussion, theme, etc]
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); // plugins
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); // incoming links
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); // wordpress blog
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); // other wordpress news
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); // quickpress
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']); // drafts
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']); // comments
}
/* NOTE: you can comment out the dashboard widgets to keep*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment