Skip to content

Instantly share code, notes, and snippets.

@mitchellhislop
Created March 5, 2011 04:24
Show Gist options
  • Save mitchellhislop/856108 to your computer and use it in GitHub Desktop.
Save mitchellhislop/856108 to your computer and use it in GitHub Desktop.
// Create the function to use in the action hook
function example_remove_dashboard_widgets() {
// Globalize the metaboxes array, this holds all the widgets for wp-admin
global $wp_meta_boxes;
// Remove the quickpress widget
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
// Remove the incoming links widget
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
}
// Hoook into the 'wp_dashboard_setup' action to register our function
add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment