Remove Meta Boxes from Dashboard


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



Copy this code and paste it in your HTML
  1. // REMOVE META BOXES FROM WORDPRESS DASHBOARD FOR ALL USERS
  2.  
  3. function example_remove_dashboard_widgets() { // Globalize the metaboxes array, this holds all the widgets for wp-admin global $wp_meta_boxes;
  4. unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);} add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.