# Hide the MonsterInsights Dashboard Widget

> Removes the MonsterInsights reports widget from the WordPress dashboard for everyone except administrators, or for all users.

- Type: PHP
- Runs: Admin only
- Category: [Plugin Integrations](https://wpide.com/library/category/integrations/)
- Tags: monsterinsights, dashboard, widgets
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/monsterinsights-hide-dashboard-widget/

## Code

```php
$wpide_everyone = false; // true = remove for all users.

add_action( 'wp_dashboard_setup', function () use ( $wpide_everyone ) {
    if ( ! function_exists( 'MonsterInsights' ) && ! function_exists( 'monsterinsights_get_option' ) ) {
        return;
    }

    if ( $wpide_everyone || ! current_user_can( 'manage_options' ) ) {
        remove_meta_box( 'monsterinsights_reports_widget', 'dashboard', 'normal' );
        remove_meta_box( 'monsterinsights_reports_widget', 'dashboard', 'side' );
    }
}, 999 );
```

## Notes

Set $wpide_everyone to true to remove it for administrators too.

## How to use it

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