WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Tutorials» How to Remove WordPress Dashboard Widgets

How to Remove WordPress Dashboard Widgets

Last updated on May 29th, 2013 by Editorial Staff
18 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
How to Remove WordPress Dashboard Widgets

Have you ever worked on a project which required you to customize the display of the WordPress admin panel? Well one of the first things consultants customize is the WordPress Dashboard. We showed you a quick example of how to add custom dashboard widgets in WordPress. In this article, we will show you how to remove WordPress dashboard widgets.

Note: If you ended up on this article looking for how to remove dashboard widgets just for yourself, then you should probably look at our article: How to Customize WordPress Admin Area (Dashboard) for Beginners

All you have to do is simply paste the following code in your theme’s functions.php file. Although it maybe a good idea to save this file as a plugin and make it a drop-in plugin.

function remove_dashboard_widgets() {
	global $wp_meta_boxes;

	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);

}

add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );

Each of the widgets listed above are pretty self-explanatory. You can keep the ones you want by simply removing them from the list. If you want to remove these widgets from all users except for admins, then just change the last line to this:

if (!current_user_can('manage_options')) {
	add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );
}

We hope that this article helped you remove the default dashboard widgets in WordPress.

18 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • How to Properly Move Your Blog from WordPress.com to WordPress.org

  • Google Analytics in WordPress

    How to Install Google Analytics in WordPress for Beginners

  • How to Start Your Own Podcast (Step by Step)

    How to Start Your Own Podcast (Step by Step)

  • Checklist

    Checklist: 15 Things You MUST DO Before Changing WordPress Themes

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

31 Comments

Leave a Reply
  1. John says:
    Apr 4, 2020 at 1:53 pm

    Thanks for this!

    I’ve added the new diagnosis widget to your code.

    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_site_health']);

    Cheers

    Reply
    • WPBeginner Support says:
      Apr 6, 2020 at 8:39 am

      Thanks for sharing for those looking to remove that :)

      Reply
  2. heidi says:
    Apr 1, 2020 at 12:55 am

    I never intentionally changed anything about my dashboard but when I try to go to mysite.com/wpadmin, it SETTLES on a blank white window and claims to be my dashboard in the address bar and the progress indicator on the lower-left corner of the browser window I have open(Chrome, in my case).
    Help me!

    Reply
    • WPBeginner Support says:
      Apr 1, 2020 at 8:52 am

      For that issue, you would want to take a look at our guide here: https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-wordpress-white-screen-of-death/

      Reply
  3. adrian says:
    Feb 26, 2019 at 3:34 pm

    The only one missing here for me is –

    unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_activity’]);

    At least for my case ofcourse. is that Activity window I wanted to hide from users.

    Reply
    • WPBeginner Support says:
      Feb 27, 2019 at 10:41 am

      Thanks for sharing another widget that can be removed :)

      Reply
  4. Aaron says:
    Feb 22, 2019 at 8:41 pm

    This article is in need of updating.

    Reply
    • WPBeginner Support says:
      Feb 25, 2019 at 2:35 pm

      Thank you for informing us of this older article. We will certainly look into updating it but for the time being the method should still work.

      Reply
  5. Rogerio Lopes says:
    Jan 21, 2014 at 9:29 am

    Something similar to remove Myspace Widget from dashboard…?

    Reply
  6. Joan says:
    Dec 17, 2013 at 2:50 pm

    Only 5 are valid now:

     
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
    update_user_meta( get_current_user_id(), 'show_welcome_panel', false );
    remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');
    
    Reply
  7. Nick Haskins says:
    Dec 8, 2013 at 10:03 am

    WP 3.8 adds an activity box. Remove it like so;

    remove_meta_box( ‘dashboard_activity’, ‘dashboard’, ‘normal’);

    Reply
  8. Tim says:
    Nov 19, 2013 at 9:44 pm

    Hello Mr Staff,
    Fancy your parents calling you Editorial :-)

    Very useful site guys.
    I have just tried this code on WP 3.7.1. and it still works… almost
    Posted in all the above but I still have Recent Drafts showing and the first large main meta-box, no idea what this box is called. Could you perhaps post the line of code needed if possible? thanks.

    Reply
  9. Hasan says:
    Sep 22, 2013 at 8:38 pm

    Thank you !

    Reply
  10. omannay says:
    Dec 4, 2012 at 8:55 am

    Hey. Thanks for the article; very helpful.
    One thing to fix, however: dashboard_recent_drafts is not in ‘normal’. It is in ‘side’.
    It’s great to be able to disable these extras for clients.
    Appreciate the help your site has provided as I learn to really control WordPress.

    Reply
  11. Adam says:
    Sep 5, 2012 at 11:57 pm

    Very good. Thanks for sharing!

    Reply
    • Adam says:
      Oct 9, 2015 at 6:54 pm

      That’s funny. I made a comment on this post 3 years ago! Here’s a better way of removing unneeded dashboard widgets:

      Reply
      • WPBeginner Support says:
        Oct 9, 2015 at 7:22 pm

        Adam, this article is about removing Dashboard widgets not the widgets on the front-end of your site. These widgets appear in the main Dashboard screen of your WordPress admin area.

        Reply
        • Adam says:
          Oct 10, 2015 at 1:25 am

          Dang, you’re right. I copied the wrong link. Here’s the correct one I meant to reference:

        • WPBeginner Support says:
          Oct 11, 2015 at 1:36 am

          Adam, thanks we got your point. If you look at the article, in the second paragraph we have mentioned a link to the tutorial which shows the method you pointed out. Clicking on Screen Options and hiding widgets is handy when you just want to hide widgets for yourself. The code presented in this article, will hide the widgets for all users who have access to the admin area.

        • Adam says:
          Oct 12, 2015 at 11:54 pm

          @WPBeginner Support – The 2nd link I sent does not demonstrate hiding widgets with the Screen Options tab in the WordPress admin. It shows a different method, utilizing the WordPress API. Not to worry, your article has been useful.

  12. jpelker says:
    Sep 18, 2011 at 11:41 am

    @keithybhoy Members by Justin Tadlock: http://wordpress.org/extend/plugins/members/

    Reply
  13. keithybhoy says:
    Sep 18, 2011 at 10:42 am

    Hi, thanks for sharing. I would like to give a user with an Editor role access to the Widgets area in the admin panel, any recommendation of which plugin to use for this?

    Reply
  14. easyP says:
    Sep 17, 2011 at 6:21 am

    Thanks boys.

    I learn something everytime I visit..

    Reply
  15. wpbeginner says:
    Sep 16, 2011 at 5:08 pm

    @jpelker Unfortunately, we don’t provide custom codes like that.

    Reply
  16. jpelker says:
    Sep 16, 2011 at 2:36 pm

    @wpbeginner It’s for all users. Would you be interested in solving this and providing the code?

    Reply
  17. wpbeginner says:
    Sep 16, 2011 at 2:35 pm

    @jpelker If it is just for your user, you can turn it off under screen settings… If not then, you would have to look into what action he is using, and then remove that action.

    Reply
  18. jpelker says:
    Sep 16, 2011 at 2:33 pm

    How do you remove third-party widgets, i.e. Yoast’s news widget that displays when you install his SEO plugin?

    Reply
    • _dm says:
      Nov 23, 2011 at 7:22 am

      @jpelker Try to wrap “admin_init” around it, this should then include third-party widgets also.

      See the following code (not tested):

      http://pastebin.com/3jtM8uuS

      Reply
  19. jengraph says:
    Sep 16, 2011 at 1:31 pm

    Great, thanks for clarifying!

    Reply
  20. wpbeginner says:
    Sep 16, 2011 at 1:21 pm

    @jengraph You are editing your theme’s functions.php file… Not the core functions.php file. Your theme will never change during the core upgrade.

    Reply
  21. jengraph says:
    Sep 16, 2011 at 1:14 pm

    I always wondered when we make these modifications, to functions, other files. What happens when we upgrade WP?? How does one remember all the modifications they made with each version?

    Reply

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
SeedProd Logo
SeedProd
Create beautiful custom landing pages - Drag & drop builder. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2020 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2020)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2020)
    • SiteGround Reviews from 4196 Users & Our Experts (2020)
    • Bluehost Review from Real Users + Performance Stats (2020)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2020 – Step by Step Guide
Deals & Coupons (view all)
LiveChat logo
LiveChat Inc Coupon
Get a 30 day free trial and 30% OFF LiveChat, one of the best live chat service providers for WordPress users.
Photocrati Coupon
Get 20% off on Photocrati premium photography theme for WordPress.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).
Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress CDN by MaxCDN | WordPress Security by Sucuri.