How to Remove Default WordPress Widgets

WordPress comes with number of built-in widgets which allows you to extend the functionality of your WordPress website. But, in most of the cases you may not want all of these default widgets.

How to Remove Default WordPress Widgets

How to Remove Default WordPress Widgets

You can easily disable the unnecessary widgets which are not in use using the following code snippet.

//
function ccw_unregister_default_widgets() {
     unregister_widget('WP_Widget_Pages');			//Page Widget
     unregister_widget('WP_Widget_Calendar');			//Calender Widget
     unregister_widget('WP_Widget_Archives');			//Archive Widget
     unregister_widget('WP_Widget_Links');			//Links Widget
     unregister_widget('WP_Widget_Meta');			//Meta Widget
     unregister_widget('WP_Widget_Search');			//Search Widget
     unregister_widget('WP_Widget_Text');			//Text Widget
     unregister_widget('WP_Widget_Categories');			//Categories Widget
     unregister_widget('WP_Widget_Recent_Posts');		//Recent Posts Widget
     unregister_widget('WP_Widget_Recent_Comments');		//Recent Comments Widget
     unregister_widget('WP_Widget_RSS');			//RSS Widget
     unregister_widget('WP_Widget_Tag_Cloud');			//Tag Cloud Widget
     unregister_widget('WP_Nav_Menu_Widget');			//Menus Widget
 }
 add_action('widgets_init', 'ccw_unregister_default_widgets', 11);

Useful Read: Exclude products from a particular category on the shop page

0 Comments

Leave a Comment.