The admin dashboard widgets in WordPress are handy and informational, but sometimes you don’t need or want them on a particular deployment. WordPress allows you to hide them by clicking the Screen Options button at the top right and deselecting the ones you don’t need. This is nice and easy, but it only hides them. They still load, and in some cases they fetch data from remote sources.
Use the following code to remove the default WordPress admin dashboard widgets. Please note this example will remove all of them, and you surely don’t want that. If you copy and paste this code, remove the lines for the widgets you want to keep in your admin dashboard.
function jp_remove_widgets() { // Remove "Right Now" widget remove_meta_box( 'dashboard_right_now', 'dashboard', 'core' ); // Remove "Recent Comments" widget remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'core' ); // Remove "Incoming Links" widget remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'core' ); // Remove "Plugins" widget remove_meta_box( 'dashboard_plugins', 'dashboard', 'core' ); // Remove "Quick Press" widget remove_meta_box( 'dashboard_quick_press', 'dashboard', 'core' ); // Remove "Recent Drafts" widget remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'core' ); // Remove "WordPress Blog" widget remove_meta_box( 'dashboard_primary', 'dashboard', 'core' ); // Remove "Other News" widget remove_meta_box( 'dashboard_secondary', 'dashboard', 'core' ); } // Hook into the dashboard action add_action('admin_menu', 'jp_remove_widgets' );