Every time I hand a WordPress site to a client, the first thing they see when they log in is a mess I did not make. A green banner begging for a five-star review. A yellow "upgrade to Pro" nag. A "connect your account" prompt from a plugin they will never open. The WordPress dashboard collects admin notices from every plugin and theme installed, and on a real client site that stack can be ten banners deep before you reach anything useful. Here is how I hide all admin notices in WordPress with one small snippet.
Why the dashboard fills up with notices
There is no central notifications system in WordPress that plugins politely ask permission to use. Instead, every plugin and theme hooks its banner onto a single action called admin_notices, and WordPress prints whatever is attached to it at the top of every admin screen. There is no built-in setting to turn them off and no way to filter them by plugin from the UI. If you want them gone, you have to unhook them in code.
The fix: clear the admin_notices hook
The snippet is deliberately blunt. On admin_init it looks at the global filter registry, and if anything is attached to the admin_notices hook it removes the whole lot in one line.
function hide_all_admin_notices() {
global $wp_filter;
if (isset($wp_filter['admin_notices'])) {
// Remove all actions hooked to the 'admin_notices' hook.
unset($wp_filter['admin_notices']);
}
}
add_action('admin_init', 'hide_all_admin_notices');
That is the entire thing. No settings page, no allow-list, no per-plugin fiddling. Once it is active the top of the dashboard is quiet.
How to install it
I never edit functions.php for this. It belongs in the Code Snippets plugin, where it survives theme changes and you can toggle it off in one click if you ever need to.
- Install and activate the Code Snippets plugin.
- Open Snippets > Add New and paste the code above.
- Set it to run everywhere, then activate. The hook only fires inside wp-admin, so there is no front-end cost.
The trade-off to keep in mind
This hides every notice, and I mean every one. That includes the useful ones: the "an update failed" warning, the "your PHP version is out of date" note, the odd genuine error a plugin surfaces. Since you no longer see those in passing, get into the habit of checking the Updates screen and your key plugin pages directly. On sites where I want the cleanup but still want my own warnings, I scope it so it only runs for non-administrator roles, but the simple version above is what most client sites need.
Still works in 2026
The admin_notices hook has been part of WordPress forever and it has not changed, so this snippet behaves exactly the same on current WordPress in 2026 as it did years ago. It is one of the first things I add to a fresh client build.
The snippet lives on GitHub: djaysan/hide-admin-notifications. Star or fork it if it tidied up your dashboard.
Setting up a site for a client and want the admin area to feel calm and professional? Get in touch.