How to Quickly Remove Widgets from the Dashboard in WordPress? » Rank Math


Like most WordPress users, you’ve probably noticed that your dashboard has begun to take on a life of its own. Over time, it’s become a dumping ground for all sorts of widgets and other plugin add-ons that don’t necessarily belong there.

You might have tried to remove widgets from the dashboard, only to find that they have been recreated elsewhere on the site. Often, disabling unwanted widgets requires hunting down and finding a way to disable them from within WordPress.

You can either disable unwanted widgets from your WordPress dashboard or use a code snippet.

In this post, we’ll show you how to remove widgets from the dashboard in WordPress for a clutter-free widget experience.

1 Why Disable Unwanted Widgets in WordPress Dashboard?

If you’re using WordPress, you’ve probably noticed that the platform offers a wide variety of widgets that you can add to your site’s sidebar, footer, or anywhere else you want.

In the same way, some exclusive widgets are available to add dedicatedly to your WordPress Dashboard. These small blocks of elements provide extra information or functionality.

Some of these widgets serve a purpose, like an Activity widget that shows the recently published articles on our website or an SEO overview widget to show your site’s performance at a glance. Still, many of them are entirely not needed.

The only way to eliminate these widgets is to disable them in your WordPress dashboard. Now, let’s dive in and see how to remove widgets from the dashboard.

2 How to Remove Widgets from the Dashboard in WordPress?

2.1 Disable Unwanted Widgets in WordPress

To begin with, you’ll have to install and activate the Widget Disable plugin.

To install the plugin, navigate to the Plugins > Add New section of your WordPress dashboard. Look for the Widget Disable plugin in the search bar and install and activate it, as shown below.

Add the Widget Disable plugin to remove widgets from the dashboard.

Once the plugin is activated, navigate to the Appearance > Disable Widgets page to configure plugin settings.

Select the widgets you want to hide from the Dashboard Widgets tab. You can also select the sidebar widgets you wish to disable from the Sidebar Widgets tab. Click on the Save Changes button to store your settings.

select the widgets to disable

You can now visit the dashboard page, and all the selected widgets will no longer be visible on your widgets screen.

widgets removed from the dashboard.

2.2 Remove Widgets from the Dashboard Using Code Snippet

You must add the following code in your theme’s functions.php file or a site-specific plugin if you want to remove widgets from the dashboard completely.

Note: Please take a complete site backup before you fiddle with the files. If something goes wrong, you can easily undo the changes. Also, by customizing the below code snippet, you can disable any widget from your WordPress dashboard.

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']);
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);
    unset($wp_meta_boxes['dashboard']['normal']['high']['rank_math_dashboard_widget']);
}
  
add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );

All of the widgets mentioned in the above list are pretty self-explanatory.

Decide which ones you want to leave and which you wish to remove from the list. And for those you don’t want, let them be in the code. That’s because we use unset, i.e., remove the option, rather than specifying which ones we want to leave.

3 Conclusion

Keeping your widget list short can make it easier to find widgets; however, if you have more widgets on the list, you’d likely want to remove them from the dashboard.

Customizing your dashboard is one change you might want to think about making. When you log in, the dashboard is the first thing you come across.

How many WordPress widgets are active at a given time on your site? Do you choose a shortened list of widgets or a lengthy one? Let us know by Tweeting @rankmathseo. 💬





Source link

Social media & sharing icons powered by UltimatelySocial
error

Enjoy Our Website? Please share :) Thank you!