One thing that's really been annoying me lately is the number of plugins that are flooding the WordPress Dashboard with useless and annoying notifications or nags.
I've written before about how you can automatically remove the annoying Yoast SEO Nag whenever it updates. It seems that Wordfence has now joined the bandwagon and has started including annoying, and mostly useless, Dashboard notifications into its plugin as well. I call them useless because the majority of the time the notification that is displaying is simply informing you that there are plugins that need updating. This is annoying because it's duplicating core WordPress functionality. WordPress already informs you when something needs updating (be it a plugin, theme or Core itself). Plugins shouldn't be duplicating core functionality! There's just no need for it.
As you can see above, other Wordfence notifications simply point to information on the latest plugin updates or their recent blog posts. Neither of which need to be highlighted with a Dashboard notification.
The only notification which is of some use is the one advising of any issues found in any recent Wordfence scans. Even with this one though, there's a good chance that you're already being notified of this anyway with the (email) Alerts that can be configured in the Wordfence options.
If you're sick of these annoying notifications like I am, then simply add the following to the functions.php
file in your theme. This will automatically clear all the Wordfence notifications for you. #yourewelcome
A couple of things to note:
– If you're adding this code to the bottom of your existing functions.php
file, there's a good chance you wont need to include the opening php tag
– Adding this code wont clear the notifications straight away. It will clear them after Wordfence refreshes them, which is after plugin updates and when their hook is actioned.
Let me know in the comments if you’ve found this helpful or if you know of any other plugins that display annoying notifications or nags.