Top

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

March 18, 2011

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.

Tweet This Post

Because this plugin/widget is provided free of charge, I simply ask you to link back to Pressography.com in a post on your blog, or from one of your sites. It doesn't need to be anything fancy - just a note saying that you're using it, and whether or not you like it. However, there is no requirement that you do this, you're free to use the plugin regardless.

Comments

2 Responses to “How to Unregister the Default WordPress Widgets to Clean Up Your Dashboard”

  1. Louis vuitton on November 9th, 2011 10:41 pm

    Good tips. I have met such problems. Thanks for the solutions.

  2. Yukon Cornelius on March 21st, 2011 12:37 am

    Sweet, just what I needed!

Got something to say?

Bottom
Article Archive  |  This site is a historical archive of pressography.com, a WordPress plugin and theme blog that published between 2006 and 2012. It is preserved for reference and is not operated by, affiliated with, or endorsed by its original authors. Nothing here is for sale and no form on this site is active. If you are the original owner and would like this domain returned, please get in touch.