# Hide Core Update Notices From Non-Administrators

> Stops the "WordPress x.y is available" banner from showing to users who cannot update WordPress, so editors and authors are not distracted by it.

- Type: PHP
- Runs: Admin only
- Category: [Admin](https://wpide.com/library/category/admin/)
- Tags: updates, notices, roles
- Author: WPIDE Team
- Installs: 6
- Updated: 2026-10-28
- Page: https://wpide.com/library/hide-update-notices-for-non-admins/

## Code

```php
add_action( 'admin_head', function () {
    if ( current_user_can( 'update_core' ) ) {
        return;
    }

    remove_action( 'admin_notices', 'update_nag', 3 );
    remove_action( 'network_admin_notices', 'update_nag', 3 );
}, 1 );
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Hide Core Update Notices From Non-Administrators" 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/
