There are multiple ways to hide WordPress dashboard notifications. There is a easy way in wordpress dashboard and there is a forceful way using a code snippet. Let’s look at both of them.
Hiding WordPress dashboard notification using "Screen options"
Log in to the WordPress admin area and go to the “Plugins” section.
Select the “Installed Plugins” option from the submenu.
On the installed plugins page, click the “Screen Options” button in the top right corner of the screen.
In the Screen Options menu, check the “Hide Update Notifications” box and click the “Apply” button to save your changes.
This will hide all plugin update notifications from the WordPress dashboard, but you can still manually update your plugins by going to the “Updates” section in the WordPress admin area.
Note: If you want to hide only specific plugin update notifications, you can do so by clicking the “Dismiss” button next to the notification on the WordPress dashboard. This will hide the notification for that specific plugin only.
The above option works for you in case you are trying to hide notification in your profile. But if you are planning to hide notifications for all the logged in users who has dashboard access, you can try the options below.
Hiding WordPress dashboard notification using "Code snippet"
If you are looking to hide wordpress dashboard notifications of all plugins and there are many users accessing the wordpress dashboard this code might work for you.
// Hide WP dashboard notifications to all users
function pkws_hide_notices_to_all(){
remove_all_actions( ‘user_admin_notices’ );
remove_all_actions( ‘admin_notices’ );
}
add_action(‘in_admin_header’, ‘pkws_hide_notices_to_all’, 99);
If you are looking to hide wordpress dashboard notifications of all plugins but show notifications for admin users, try below code.
// Hide WP dashboard notifications to all users except admins
function pkws_hide_notices_to_all_but_super_admin(){
if (!is_super_admin()) {
remove_all_actions( ‘user_admin_notices’ );
remove_all_actions( ‘admin_notices’ );
}
}
add_action(‘in_admin_header’, ‘pkws_hide_notices_to_all_but_super_admin’, 99);