Skip to content

Instantly share code, notes, and snippets.

@nutsandbolts
Created November 7, 2013 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nutsandbolts/7353544 to your computer and use it in GitHub Desktop.
Save nutsandbolts/7353544 to your computer and use it in GitHub Desktop.
Remove WP Dashboard widgets (functions.php)
// Remove WP dashboard widgets
function nabm_remove_dashboard_widgets() {
remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );
}
add_action('wp_dashboard_setup', 'nabm_remove_dashboard_widgets' );
// Don't try to use this anywhere in your site files - this is just a list so you'll know what widgets you can remove using the function above. //
// Main column:
$wp_meta_boxes['dashboard']['normal']['high']['dashboard_browser_nag']
$wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']
$wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']
$wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']
$wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']
// Side Column:
$wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']
$wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']
$wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']
$wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment