Skip to content

Instantly share code, notes, and snippets.

@erikccoder
Created May 10, 2013 04:48
Show Gist options
  • Save erikccoder/5552441 to your computer and use it in GitHub Desktop.
Save erikccoder/5552441 to your computer and use it in GitHub Desktop.
wordpress remove widget from dashboard
//HIDING UNWANTED WORDPRESS DASHBOARD WIDGETS
add_action('wp_dashboard_setup', 'wpc_dashboard_widgets');
function wpc_dashboard_widgets() {
global $wp_meta_boxes;
// Today widget
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
// Last comments
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
// Incoming links
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
// Plugins
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment