Return to Snippet

Revision: 51316
at September 21, 2011 02:31 by RainyDayMedia


Initial Code
function remove_dashboard_widgets() {
  global $wp_meta_boxes;
  // For right now information widget
  unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
  // For recent comments listing widget
  unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
  // For quick press widget
  unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
  // For recent drafts widget
  unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);
  // For Plugin information widget
  unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
  // For incoming links information widget
  unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
  // For WordPress blog news widget
  unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
  // For other WordPress news widget
  unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
}
add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );

Initial URL
rainydaymedia.net

Initial Description
For those of use who use Wordpress as a CMS, this gives you the option of hiding all your dashboard widgets, for all users.
<br>**Open your theme’s functions.php file located in your theme’s folder. Copy this script, paste it at the bottom of  your theme’s function.php file and save it.<br> Go to the dashboard page and everything is gone.

Initial Title
Remove ALL Wordpress Dashboard Widgets 3.0+

Initial Tags
php, wordpress

Initial Language
PHP