Although those default widgets can be very useful, many users tend to replace them with improved versions which can be found on the Internet. Also, you will find yourself never using many of those widgets, so why leave them active and in your way?
In this article, we’ll show you how to easily unregister those default widgets and remove them from the list:
-
- Open functions.php file
- Copy and paste the following code:
function unregister_default_wp_widgets() { unregister_widget('WP_Widget_Pages'); unregister_widget('WP_Widget_Calendar'); unregister_widget('WP_Widget_Links'); unregister_widget('WP_Widget_Meta'); unregister_widget('WP_Widget_Archives'); unregister_widget('WP_Widget_Search'); unregister_widget('WP_Widget_Recent_Posts'); unregister_widget('WP_Widget_Categories'); unregister_widget('WP_Widget_Recent_Comments'); unregister_widget('WP_Widget_RSS'); unregister_widget('WP_Widget_Text'); unregister_widget('WP_Widget_Tag_Cloud'); unregister_widget('WP_Widget_Media_Audio'); unregister_widget('WP_Widget_Media_Video'); unregister_widget('WP_Widget_Media_Image'); } add_action('widgets_init', 'unregister_default_wp_widgets', 1);
- Save changes, and you’re done