Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Disable Unwanted Widgets in WordPress Admin (2 Ways)

Many WordPress users want to disable unwanted widgets in their WordPress dashboard. When you use a lot of plugins that add widgets to the admin dashboard, these widgets can create a lot of clutter and make it hard to focus on important tasks when managing your website.

We looked for ways to solve this problem and found some plugins that can remove dashboard widgets, but a lot of them offer this feature for a price. We don’t think you should have to pay for something so simple.

The good news is we’ve found an easy, free way to remove unwanted widgets from your WordPress admin dashboard. This guide will show you how to do it without spending any money or causing problems on your site.

How to Disable Unwanted Widgets in WordPress

Why Disable Unwanted Widgets in Your Dashboard?

When you log into your WordPress site, you’ll see a screen called the dashboard. This is part of the admin area where you manage your website. The dashboard includes several small boxes, called widgets, that display various information and tools.

Areas of the WordPress Dashboard

Some of these widgets are from WordPress, while others are added by the plugins and themes you install. Typically, the more plugins you use, the more widgets you’ll see on the dashboard.

While these widgets can be useful, they can also create a lot of clutter. They might show information you don’t need or slow down your page loading. That’s why some website owners choose to disable unwanted widgets.

By removing unnecessary widgets, you can make your dashboard cleaner and easier to use. It’s like cleaning up your desk – when you remove items you don’t use, you can focus better on what’s important.

Disabling widgets can also make your dashboard respond quicker. This is helpful if you spend a lot of time managing your site. Just like some users turn off the WordPress admin bar to simplify their view, removing unnecessary widgets can make your work easier and more efficient.

With all that in mind, let’s take a look at how to disable unwanted widgets in WordPress. You can use the quick links below to skip to your preferred method:

Pro Tip: Are you looking to remove certain menu items from your WordPress admin area instead? Then check out our step-by-step guide on how to hide unnecessary menu items from WordPress admin.

How to Remove Specific WordPress Dashboard Widgets

You can easily tidy up your dashboard by going to Dashboard » Home, clicking the ‘Screen Options‘ button, and unchecking the widgets you don’t want to see. This is the quickest and simplest approach.

The Screen Options feature in the WordPress dashboard

However, this method allows you and other users to easily display those widgets again by accessing the ‘Screen Options’ menu and re-enabling them.

A more permanent solution is to add custom code to your theme’s functions.php file. Don’t worry if this sounds complicated – we’ll do it safely using the WPCode plugin.

WPCode is a code snippet plugin that lets you customize your site beyond what plugins or themes typically allow. It acts as a middleman, enabling you to add custom code without directly editing your website files. WPCode can also disable your code if it encounters errors.

While you can use the free version of WPCode for this tutorial, we’ll use the premium version because it includes an AI code generator, which can be helpful later in this guide.

You can learn more about the plugin in our WPCode review.

To use WPCode, go ahead and install the WordPress plugin in your admin area. After that, go to Code Snippets » + Add Snippet.

Then, select ‘Add Your Custom Code (New Snippet’ and click on the ‘+ Add Custom Snippet’ button.

Adding a new custom code snippet in WPCode

Now, give your custom code a simple name like ‘Remove WordPress Dashboard Widgets’ to easily identify it later.

Then, change the Code Type to ‘PHP Snippet.’

Adding custom code to WPCode to remove specific WordPress dashboard widgets

Next, paste the following snippet into the ‘Code Preview’ box:

function remove_dashboard_widgets() {
    global $wp_meta_boxes;

    // Remove the Welcome panel
    remove_action('welcome_panel', 'wp_welcome_panel');

    // Remove Site Health Status widget
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_site_health']);

    // Remove WordPress Events and News widget
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
}

add_action('wp_dashboard_setup', 'remove_dashboard_widgets');

This code removes the Welcome panel, Site Health Status widget, and WordPress Events and News widget from your dashboard.

You can modify the code to remove other widgets as well. If you’re unsure how to do this, you can use WPCode’s AI feature.

Simply click on the AI button next to the ‘Code Type’ dropdown menu.

Clicking on the WPCode AI button

Then, enter a prompt asking WPCode to add lines of code to remove another widget. For example, we asked it to remove the Activity widget.

After that, just click ‘Generate.’

Asking WPCode AI to remove a specific WordPress dashboard widget

The AI will add a new line to remove the specified widget:

function remove_dashboard_widgets() {
    global $wp_meta_boxes;

    // Remove the Welcome panel
    remove_action( 'welcome_panel', 'wp_welcome_panel' );

    // Remove Site Health Status widget
    unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_site_health'] );

    // Remove WordPress Events and News widget
    unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] );

    // Remove Activity widget
    unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity'] );
}

add_action( 'wp_dashboard_setup', 'remove_dashboard_widgets' );

With that done, just scroll down to the ‘Insertion’ section. Make sure the ‘Insert Method’ is set to ‘Auto Insert’ and the Location is ‘Admin Only.’

Next, just toggle the Inactive button to make it ‘Active’ and click on the ‘Save Snippet’ button.

Loading the WPCode code snippet only in the WordPress admin area

When you return to Dashboard » Home, you’ll only see the default widgets you didn’t disable.

In our example, this leaves the ‘At a Glance’ and ‘Quick Draft’ widgets visible.

Removing specific WordPress dashboard widgets with WPCode

How to Completely Empty Your WordPress Admin Dashboard

If you don’t use the dashboard at all and want to completely empty it of widgets, then WPCode offers a code snippet template for this purpose.

To use it, go to Code Snippets » + Add Snippet. After that, find the ‘Empty Admin Dashboard’ code using the search bar and click on the ‘Connect to library to unlock (Free)’ button.

Connecting to the WPCode library to find the code snippet for emptying the admin dashboard

Now, a popup window will appear asking you to create a WPCode account or log in to your existing one.

After logging in, check the box that says ‘Enable pushing snippets from the library to your site’ and click on the ‘Connect to WordPress’ button.

Connect code library

The window will then close, and you will return to the previous WPCode page.

Now, the button under the ‘Empty Admin Dashboard’ option will change to ‘Use snippet.’ Go ahead and click on it.

Selecting the Empty Admin Dashboard code snippet template from WPCode

At this stage, WPCode will set up the code for you.

Your screen should now display the prepared code snippet like so:

What the Empty Admin Dashboard WPCode code snippet looks like

You can activate this code and update it as is. Alternatively, you could add an extra line of code to make the snippet work only for non-admin users.

Here’s the full custom code snippet if you choose to add that extra line:

add_action( 'wp_dashboard_setup', function () {
    // Check if the current user does NOT have admin privileges
    if ( ! current_user_can( 'manage_options' ) ) {
        global $wp_meta_boxes;
        $wp_meta_boxes['dashboard'] = array();
        remove_action( 'welcome_panel', 'wp_welcome_panel' );
    }
}, 1000 );

After making any changes, activate the code snippet and click the ‘Update’ button above.

Adding a line of code to empty the admin dashboard for non-admin users, using WPCode

With this done, all WordPress dashboard widgets will be disabled, either for all users or just for non-admin users, depending on which version of the code you used.

Here’s what it should look like:

What the WordPress dashboard looks like when it's empty

Discover More Tips and Tricks to Customize WordPress Admin

Now that you know how to manage your WordPress dashboard widgets, you might want to learn more ways to customize your admin area. Here are some helpful articles to make your WordPress experience even better:

We hope this article helped you learn how to disable unwanted widgets in WordPress admin. You may also want to see our guide on expert picks of the best WordPress activity log and tracking plugins and our step-by-step guide on how to deactivate plugins when you can’t access wp-admin.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

13 CommentsLeave a Reply

  1. Syed Balkhi

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. kzain

    Disabling unused widgets seems like a quick win for both organization and website performance. I quite like the recommendation for the Widget Disable plugin, it sounds perfect for someone who wants an easy solution.

  3. Jiří Vaněk

    I tested the snippet using WP-Code and it works great. What I needed to hide on the board really disappeared. The big advantage is that I don’t have to use any other plugin to achieve this result. I love your tutorials that can be solved by simply using a snippet. It really saved me a lot of space for unnecessary plugins.

    • WPBeginner Support

      Glad to hear the snippet was helpful :)

      Admin

  4. Arnold

    Why are you using “unset()” in stead of “remove_meta_box()”?

    Curious :-)

    High Regards,
    Arnold.

    • WPBeginner Support

      remove_meta_box can be good if you know when the meta box was added and add the code in the correct location but the unset method does not require that level of knowledge and is more guaranteed to work for a beginner :)

      Admin

  5. Maria

    Hi.
    When I disable all the other widgets, I’m losing my search-field as well even though i do not choose this on the list. So I want to keep my search field, but not the other widgets. How can i fix this?

  6. Joshua Hoe

    So if hiding the widgets mean Unregistered widgets will not be loaded, does it also mean that the website speed will be faster as well?

    • WPBeginner Support

      Depending on the widgets you are disabling there could be a small speed increase but in general nothing overly noticeable in terms of speed

      Admin

  7. Luis

    Hi,
    But how can we remove the widget area as seen in last picture? The widgets are gone, but the boxes (empty) are there to see. Can we also remove this empty boxes?

    Thanks

    • WPBeginner Support

      You would need a different plugin for that, the plugin does not currently remove those

      Admin

  8. Jeff Yablon

    Umm … You know this disables nothing? It HIDES them, leaves their stub coded overhead, and adds an extra plug-in.

    • WPBeginner Support

      Hi Jeff,

      It actually unregisters those widgets, which is not the same as hiding. Unregistered widgets are not loaded.

      Admin

Leave A 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.