• Skip to main content
  • Skip to primary sidebar
  • Business
  • WordPress
  • Security
  • Marketing
  • Publicity
  • Computing
  • Resources
  • Whatevs

Purely Wordpress

Just The Tech, News, and Info We Deem To Post

  • Home
  • About
  • Contact
  • Contribute
You are here: Home / Code Snippets / Remove Default Widgets from the WordPress Dashboard

Remove Default Widgets from the WordPress Dashboard

Screenshot of WordPress plugin php and html code

Add the following code to your WordPress theme’s function.php file, or a functionality plugin to remove the default widgets from the WordPress dashboard.

// Create the function to use in the action hook
function example_remove_dashboard_widgets() {
	// Globalize the metaboxes array, this holds all the widgets for wp-admin
 
	global $wp_meta_boxes;
 
	// Remove the incomming links widget
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);	
 
	// Remove right now
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
}
 
// Hoook into the 'wp_dashboard_setup' action to register our function
add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );

by Jack Alltrade on December 6, 2016

Filed Under: Code Snippets, WordPress Core Tagged With: Code, Layout, WP Core

Reader Interactions

Share Your Two Cents Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Categories

  • Code Snippets
  • Development
  • File Management
  • Genesis Framework
  • Hosting
  • Legacy
  • Plugins
  • SEO
  • Tech Terms
  • Themes
  • User Experience
  • User Interface
  • WordPress Core
  • WordPress Functionality

Warning! Use at your own risk!

As always, use at your own risk and remember to backup your site prior to inserting new code.

© Copyright Jack Alltrade & Associates 2025 · Purely Supplemental™ is a trademark of Jack Alltrade & Associates