# Remove Default Dashboard Widgets

> Cleans up the Dashboard by removing the Quick Draft, WordPress Events and News, and Activity widgets.

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

## Code

```php
add_action( 'wp_dashboard_setup', function () {
    // Widget ID => context. Delete a line to keep that widget.
    $widgets = array(
        'dashboard_quick_press' => 'side',
        'dashboard_primary'     => 'side',
        'dashboard_activity'    => 'normal',
    );

    foreach ( $widgets as $id => $context ) {
        remove_meta_box( $id, 'dashboard', $context );
    }
}, 99 );
```

## Notes

Other core widget IDs: dashboard_right_now (At a Glance), dashboard_site_health (Site Health Status).

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Remove Default Dashboard 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/
