Skip to content

Instantly share code, notes, and snippets.

@wpspeak
Created October 7, 2013 11:24
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 wpspeak/6866306 to your computer and use it in GitHub Desktop.
Save wpspeak/6866306 to your computer and use it in GitHub Desktop.
Remove WordPress dashboard widgets
<?php
//* Remove WordPress dashboard widgets
function afn_remove_dashboard_widgets() {
remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );
remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );
remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );
remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );
remove_meta_box( 'dashboard_browser_nag', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );
}
add_action('wp_dashboard_setup', 'afn_remove_dashboard_widgets' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment