How To Disable Admin Notices In WordPress (2024)
Learn how to quickly disable admin notices in your WordPress dashboard with and without using plugins with this simple guide.
How To Disable Admin Notices
- Install Hide Admin Notices by Labinator.
- Go to your dashboard.
- Open Hide Admin Notices in your sidebar.
- Use settings to enable/disable notices.
What Are Admin Notices
WordPress powers a third of the internet for a reason. It is a versatile, open-source, powerful, and feature-rich platform that offers the most reliable way to host a website without coding. WordPress provides a clean dashboard that displays everything you need to run your site. One of the things that this dashboard contains is admin notices.
Admin notices are a crucial part of your WordPress dashboard because they display important warnings, errors, and information. Different types of messages show up when certain things happen to your site. These notices are critical for running your site because they can alert you of relevant changes, errors, or settings.
Even though they may seem like a useful asset, they can become too intrusive and annoying sometimes. For some people, they can get in your way when you are trying to use your dashboard, becoming an annoyance. In this tutorial, I will explain the different types of admin notices and how to disable them.
Types of Notices
There are four main types of admin notices that can appear on your dashboard in WordPress. All of these four types are color-coded, so you will know what has happened from the colors. There is also a slew of different texts that can be in the notices. Here are the different types:
- Red – Displays an error that has occurred.
- Yellow – Displays a warning for something.
- Green – Displays any successful actions to you.
- Blue – Displays important information to you.
Note that these are the main types of admin notices that are displayed. These four main types are from WordPress, not any third-party plugins. Plugins can display other messages, depending on what plugins you have installed. However, there is also a way to disable plugin notices.
In the next section, I will show you how to disable admin notices using a plugin.
Disabling With a Plugin
Using a plugin is one of the best ways to deal with admin notices because it allows you to block certain notices while keeping others. The plugin we will be using is: Hide Admin Notices by Labinator. This plugin is great because it is light-weight, easy to use, versatile, and gives you full control.
To use this plugin follows the steps below:
- Install and activate the plugin.
- Open your WordPress dashboard.
- Find Hide Admin Notices in your sidebar.
- Open the page for the plugin.
On this screen, you can set the types of admin notices that are blocked and disabled. You can enable and disable the core and backend notices, depending on which you want. The second tab on the plugin screen gives you even more settings on how you want your admin notices disabled.
There is a lot of customizability and control here, so you can choose what to disable and enable. You can remove a specific type of admin notices with this plugin. You can also disable all admin notices, even if some of them are useful.
Disabling With Code
- Backup your WordPress site.
- Open your cPanel or FTP client.
- Navigate to wp-config.php or functions.php in your WordPress files.
- Download one of them and open it in an editor.
add_action('admin_enqueue_scripts', 'ds_admin_theme_style'); add_action('login_enqueue_scripts', 'ds_admin_theme_style'); function ds_admin_theme_style() { if (!current_user_can( 'manage_options' )) { echo '<style>.update-nag, .updated, .error, .is-dismissible { display: none; }</style>';}}
After you put that code into either one of those files, you will be able to disable any admin notices that appear.
The Perfect WordPress Solution
I hope that this tutorial was helpful and useful to you. If you want more tutorials like this one, then you should check out the Labinator blog. They have tutorials on everything, perfect for beginners to experts.
Labinator features countless stunning themes, feature-rich plugins, expert services, and more, all for affordable prices. They also give you a 30-day money-back guarantee on their products with lifetime updates and support.
WordPress Guides
Best Collection Of WordPress Guides & Checklists
Our complete and latest collection of WordPress guides and resources that cover everything you need to get the most out of your WordPress website.
Download Them All!
All of our guides will be sent to your inbox