Remove dashboard widgets

/ Published in: PHP
Save to your folder(s)


Copy this code and paste it in your HTML
  1. function remove_dashboard_widgets(){
  2. remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // Recent Comments
  3. remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // Incoming Links
  4. remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // Plugins
  5. remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); // Quick Press
  6. remove_meta_box('dashboard_recent_drafts', 'dashboard', 'side'); // Recent Drafts
  7. remove_meta_box('dashboard_primary', 'dashboard', 'side'); // WordPress blog
  8. remove_meta_box('dashboard_secondary', 'dashboard', 'side'); // Other WordPress News
  9. // use 'dashboard-network' as the second parameter to remove widgets from a network dashboard.
  10. }
  11. add_action('wp_dashboard_setup', 'remove_dashboard_widgets');

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.