# Remove Unused Default Widgets

> Unregisters rarely used classic widgets (Meta, Calendar, RSS, Tag Cloud, Pages and Recent Comments) to declutter the widget list.

- Type: PHP
- Runs: Run everywhere
- Category: [Widgets](https://wpide.com/library/category/widgets/)
- Tags: widgets, clean-up
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/remove-default-widgets/

## Code

```php
add_action( 'widgets_init', function () {
    // Delete a line to keep that widget.
    $widgets = array(
        'WP_Widget_Meta',
        'WP_Widget_Calendar',
        'WP_Widget_RSS',
        'WP_Widget_Tag_Cloud',
        'WP_Widget_Pages',
        'WP_Widget_Recent_Comments',
    );

    foreach ( $widgets as $widget ) {
        unregister_widget( $widget );
    }
}, 11 );
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Remove Unused Default Widgets" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
