How To Disable Admin Notices in WordPress Dashboard?
Tags: wordpress, beginners, plugin, code
Published: 2023-09-06 02:48:33

Admin notices are messages that appear in the WordPress admin panel to inform users of important updates or issues. While these notifications can be helpful, they can also be distracting and overwhelming, especially if you have multiple plugins installed. In this article, we will discuss two methods to disable admin notices in WordPress Dashboard for a better user experience.

## Disable Admin Notice via Code

To disable admin notices in WordPress Dashboard via code, you'll need to add a few lines of code to your functions.php file. 

In your WordPress Dashboard, navigate to Appearance > Theme Editor.

On the right side of the page, you'll see a list of files. Find and click on the file labeled functions.php.

Scroll down to the bottom of the functions.php file and paste the following code:

```
function hide_all_admin_notices() {
    global $wp_filter;

    // Check if the WP_Admin_Bar exists, as it's not available on all admin pages.
    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');

```
Click the Update File button at the bottom of the page to save your changes.

![Disable Admin Notice via code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fwkcgc69vum6hwp585pc.gif)

After saving the changes, you should no longer see admin notices in your WordPress Dashboard.

## Disable Admin Notice via WP Adminify

WP Adminify is a freemium plugin that allows you to customize the WordPress admin panel by hiding or disabling certain elements, including [Disable Admin Notices](https://wpadminify.com/modules/admin-notices/?utm_medium=dev_to&utm_source=dev_posts). Here's how to install and use the WP Adminify plugin:

### Installing WP Adminify Plugin

- Log in to your WordPress dashboard and go to Plugins > Add New.
- In the search bar, type "WP Adminify" and hit enter.
- Click the "Install Now" button next to the WP Adminify plugin.
- Once the installation is complete, click the "Activate" button to activate the plugin.

### Disabling Admin Notices using WP Adminify Plugin

Go to WP Adminify Option Panel. Make sure to enable **"Admin Notice"** module. 


![Disable Admin Notice Module by WP Adminify](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/elbj935tyf3dip9pas29.png)

Now Navigate to **"Admin Notices"** option and chose which type of notices you like to disable or want to hide all Admin Notice. 


![Disable all or individual admin notice in WordPress Dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qknjn4m96kv9alupx8x9.png)

Click the "Save Changes" button to save your settings.

## Benefits of using WP Adminify Plugin

- Simple: WP Adminify is a simple plugin that offers 22 Module
- Freemium: The plugin is free to use, making it accessible to all WordPress users. If you like the plugin you can support by purchasing any plan. 
- Lightweight: WP Adminify is a lightweight plugin that does not slow down your website.


In conclusion, disabling admin notices in WordPress Dashboard can improve the user experience by reducing distractions and overwhelming notifications. WP Adminify plugin allow you to disable admin notices easily.

I recommend trying both methods (Code & WP Adminify) to see which one works best for you. 

Remember to keep your WordPress site up to date by manually checking for updates if you disable automatic updates. Happy WordPressing!

Code Source: [https://master-addons.com/disable-wordpress-admin-notice/](https://master-addons.com/disable-wordpress-admin-notice/)

[https://developer.wordpress.org/reference/hooks/admin_notices/](https://developer.wordpress.org/reference/hooks/admin_notices/)