How to Unregister the Default WordPress Widgets to Clean Up Your Dashboard

March 18, 2011  | 
5 Comments

Widgets are one of the key features that makes WordPress so wonderfully easy to use. Everyone loves the convenience of drag and drop. WordPress comes packaged with 12 default widgets available for use. Add that to the widgets that you get from plugins and themes and you can really go overboard. Here’s an example:

And that’s only the available widgets – not including the inactive widgets.

This scenario happens to me quite frequently. I find myself saying, dang it, I know this plugin I just installed is supposed to be packaged with a widget, but I’m not sure which one it is among this vast sea of widgets! Many plugins often use similar names to the default widgets, so it can take some hunting, trial and error to figure out if you’ve got the right widget.

Let’s do a little cleanup…

If you’re not making use of many of the default widgets included with the WordPress core, here’s what you can do. Unregister them by copying and pasting this into your theme’s functions.php file:

// unregister all default WP Widgets
function unregister_default_wp_widgets() {
    unregister_widget('WP_Widget_Pages');
    unregister_widget('WP_Widget_Calendar');
    unregister_widget('WP_Widget_Archives');
    unregister_widget('WP_Widget_Links');
    unregister_widget('WP_Widget_Meta');
    unregister_widget('WP_Widget_Search');
    unregister_widget('WP_Widget_Text');
    unregister_widget('WP_Widget_Categories');
    unregister_widget('WP_Widget_Recent_Posts');
    unregister_widget('WP_Widget_Recent_Comments');
    unregister_widget('WP_Widget_RSS');
    unregister_widget('WP_Widget_Tag_Cloud');
}
add_action('widgets_init', 'unregister_default_wp_widgets', 1);

You don’t have to remove all of the default widgets if you don’t want to. If there are some in there that you plan on using, simply don’t include them in the code block. For example, let’s say you want to remove all the defaults except for the “Recent Posts” and “Recent Comments” widgets. Delete those lines from the code block and you’ll preserve those widgets. Don’t worry if you make a mistake – you can always bring them back.

A messy widget area isn’t necessarily a sign of untidiness, but if you like a clean work area, you’ll benefit from this little hack. It will take you about 1 minute to copy and paste and you’ll get instant cleanup.

Featured Plugin - Start your own Quora / StackOverflow / Yahoo Q&A site

It's now incredibly easy to start your own Q&A site using nothing more than WordPress - The Q&A plugin simply and brilliantly transforms any site, or page, into a perfect support or Q&A environment.
Find out more

Featured Plugin - WordPress + Google Maps = Perfect

Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more

Featured Plugin - Add bottom corner (or anywhere else) chat to your site

No javascript required, no third part chat engine, just fully featured chat right in your own database on your own WP sites - couldn't be easier.
Find out more

Featured Plugin - Send beautiful html email newsletters, from WordPress!

Now there's no need to pay for a third party service to sign up, manage and send beautiful email newsletters to your subscriber base - this plugin has got the lot.
Find out more

Featured Plugin - Every great SEO tweak you need, in one snazzy bundle

Fully integrated with the SEOMoz API, complete with automatic links, sitemaps and SEO optimization of your WordPress setup - this is the only plugin you need to help you rank your site number 1 on Google - nothing else compares.
Find out more

Featured Plugin - Host sites, get paid, just like WordPress.com

If you've ever wondered how you could offer a paid site management and hosting service, then this is the plugin for you. Offer a freemium or paid service, for any niche you like, it's powered Edublogs.org to success already!
Find out more

Featured Plugin - Turn any WordPress page into a fully featured wiki!

To get a wiki up and running you used to need to install Mediawiki and toil away for days configuring it... not any more! This plugin gives you *all* the functionality you want from a wiki, in WordPress!!!
Find out more

Featured Plugin - Open an Online Store with MarketPress

Out of all the WordPress ecommerce plugins available, this has got to be the winner - easy to configure, powerful functionality, multiple gateways and more. A simply brilliant plugin!
Find out more

Featured Plugin - Easily integrate your WordPress site with Facebook

Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Find out more

5 Responses to How to Unregister the Default WordPress Widgets to Clean Up Your Dashboard

  1. cool tutorial. I was fed to watch these unused widgets. great post.

  2. Pingback: Unregister the Default WordPress Widgets | Mark Wilkinson on WordPress

  3. Pingback: Enlaces de interés: 22/03/2011 | Los Links de Félix

  4. thanks alot for these templates. you rock

  5. If you want to remove the “Nav Menus” widget, just add :

    unregister_widget(‘WP_Nav_Menu_Widget’);

Click on a tab to select how you'd like to leave your comment

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting