How To disable admin notices in WordPress

To disable admin notices in WordPress, you can do so by adding some code to your theme’s functions.php file or by using a plugin. Here are the steps for both methods:

Method 1: Using Code in functions.php

  1. Access your WordPress dashboard.
  2. Navigate to Appearance > Theme Editor.
  3. In the Theme Files list on the right, find and select the functions.php file.
  4. Add the following code at the end of the file:
phpCopy
function hide_admin_notices() {
remove_all_actions('admin_notices');
}
add_action('admin_head', 'hide_admin_notices');
  1. Save the changes.

Please note that modifying theme files directly can be risky. It’s recommended to use a child theme if you’re not already doing so.

Method 2: Using a Plugin

  1. Access your WordPress dashboard.
  2. Navigate to Plugins > Add New.
  3. Search for a plugin like “Disable Admin Notices Individually” or “Admin Notices Manager”.
  4. Install and activate the plugin.
  5. Once activated, go to Settings > Admin Notices to configure the plugin’s settings.

Using a plugin is often the safer and more user-friendly option, especially if you’re not comfortable editing theme files directly.

Remember to always create a backup of your website before making any significant changes. This ensures that you can easily revert if something goes wrong