Skip to content

Instantly share code, notes, and snippets.

@alinademi
Forked from karlazz/remove dashboard widgets
Created February 11, 2023 01:49
Show Gist options
  • Save alinademi/9c459eaed2ab52c72b7a32f0c05864ec to your computer and use it in GitHub Desktop.
Save alinademi/9c459eaed2ab52c72b7a32f0c05864ec to your computer and use it in GitHub Desktop.
remove dashboard widgets
// https://deluxeblogtips.com/remove-dashboard-widgets-in-wordpress/
add_action('admin_init', 'rw_remove_dashboard_widgets');
function rw_remove_dashboard_widgets() {
remove_meta_box('dashboard_right_now', 'dashboard', 'normal'); // right now
remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // recent comments
remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // incoming links
remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // plugins
remove_meta_box('dashboard_quick_press', 'dashboard', 'normal'); // quick press
remove_meta_box('dashboard_recent_drafts', 'dashboard', 'normal'); // recent drafts
remove_meta_box('dashboard_primary', 'dashboard', 'normal'); // wordpress blog
remove_meta_box('dashboard_secondary', 'dashboard', 'normal'); // other wordpress news
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment