How to Remove Default WordPress Widgets and Clean Up Your Widgets Page


Let’s be honest – nobody uses all the default widgets that come with WordPress out of the box. In fact, there are probably a few default widgets that you would never use. Ever.

Because of this, many of those default widgets just get in the way. And so if you’d like to remove them and clean up your widgets page, there’s an easy way.

If you “unregister” a widget in your functions file, it will not appear on your widgets page. If you’d ever like it to appear again, simply go back into your functions file and remove the code you put in to unregister it.

Below is the code to put into your functions file to remove ALL the default widgets that come with WordPress. You can pick and choose which ones you’d like. If you’d like to keep your text widget, for example, then simply remove the line of code for the text widget:

unregister_widget('WP_Widget_Text');

 

Place the following in your functions file (Appearance > Editor > Theme Functions – functions.php):

 

// unregister all widgets
 function unregister_default_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');
     unregister_widget('WP_Nav_Menu_Widget');
     unregister_widget('Twenty_Eleven_Ephemera_Widget');
 }
 add_action('widgets_init', 'unregister_default_widgets', 11);

 

Featured Plugin - WordPress Ecommerce Shopping Cart Plugin

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

Here’s a look at all the default widgets:

And here’s a look at the default widgets removed:

Featured Plugin - WordPress Q&A Site Plugin

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

 

 

Photo: Pretty Woman Cleaning from BigStock