How to Remove Default WordPress Widgets


By default WordPress comes with a number of different in-built widgets which allow you to easily add additional functionality to your WordPress theme.

But if you have a custom made theme then most likely you will not be using any of these default WordPress widgets. If your not going to be using the widget then it would be good to remove these completely from the widget dashboard.

To remove these widgets just use the following function.

// unregister all widgets
 function remove_default_widgets() {
 add_action('widgets_init', 'remove_default_widgets', 11);

Remove Default WordPress Widget Plugin

There is a plugin which was brought to my attention with a comment from http://kovshenin.com/ pointing me to a URL about his plugin to remove the default WordPress widgets.

This plugin does not remove the widgets as explained above this uses a much better, more efficient way of removing the default WordPress widgets. This plugin does not use the function unregister_widget but it will block WordPress from registering the widgets to start with.

The benefit of this is that if new versions of WordPress adds new default Widgets then you don't have to open up this snippet and add another unregister_widget function, it will automatically block the new widget.

Download Remove Default Widgets Plugin

The only problem with this plugin is that if you want to use any of the default widgets you will have to then go and register them manually. By doing the opposite to the above and register the widgets by using the register_widget() function.

Now you have two ways of removing those default Widgets, just decide which one suits your needs best.

Back to top ^

Join Paulund

  • Get access to 100s of premium tutorials and downloadable content
  • Members content consists of Premium WordPress plugins, CSS packages, jQuery packages, tutorial demo files and templates for 100s of web development tutorials
  • In-depth development tutorials
  • Priority tutorial requests
  • Priority email development support
  • No ads

Here at Paulund you'll find Web Development tutorials and snippets focusing mainly on PHP, WordPress and CSS. Members will get access to premium tutorials that go into more detail about development with these languages. You will also get access to downloadable premium content based on the tutorial.

Join Paulund

Leave a Reply

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