Contents
There are a lot of times you find your dashboard is flooded with tons of notifications, mostly from plugins and themes.
In rare cases, those notifications are useful. Most of the time, they are outright annoying. Some notifications even appear after you click on the close icons right next to them.
So, you wonder, is there any way to hide these notifications for good? If possible, without using a plugin?
Well, that’s the reason I’m writing this. I’m going to show you the easiest way to hide WordPress dashboard notifications without using any plugin.
Are you ready? Let’s get started.
Hide WordPress Dashboard Notification in less than 1 minute
With this method, you need to write some code. Don’t worry, you are not actually writing any code but to copy and paste some code I have here.
Now, copy this code:
add_action('admin_head', 'bc_disable_notice'); function bc_disable_notice() { ?> <style> .notice { display: none;} </style> <?php }
Where to put this code, you might ask.
Well, let’s put this at the end of your themes functions.php file.
However, as I mentioned in many of my posts, this is not a safe way since your changes could be overridden by theme updates.
So, make sure you create a child theme of your current them and put that code at the end of your child theme’s functions.php file.
Save the file and reload your dashboard. The notices should have gone.
Hide only dismissible notices only
What if you want to hide only dismissible notices only? (The ones that have the close button at their right). Well, it’s super easy too.
Let’s remove the code you entered previously and replace with this one:
add_action('admin_head', 'bc_disable_notice'); function bc_disable_notice() { ?> <style> .notice.is-dismissible { display: none;} </style> <?php }
Save the file and you are done!
Conclusion
There you go. Now you can hide WordPress dashboard notifications without using any plugin. Let me know what you think and if you have suggestions, leave a comment below.