• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

[WordPress] How to hide notices in the admin panel

kagero

New member
Sep 18, 2019
28
8
3
Most notices after installing a plugin can be closed, but some reappear after every page refresh. Many are premium plugins that request you to enter a valid key.

There's a plugin to hide every notice, but some are actually useful, such as one-time onboarding messages.

The solution is simple: install this free plugin, aptly called Disable admin notices individually.

The rest is self-explanatory; good luck!
 
That plugin looks great. I think I came across it a while back, but was already removing them myself. I'll give it a try to see if it removes everything I need.

For anyone that wants to do things manually, here's some sample code for your child theme's functions.php

The text to search for and the CSS selectors would need to be customized per notice.

And sometimes you do get a flash of the content with this method since they are being hidden by the browser.

PHP:
// Remove Plugin List Nag


function my_custom_styles() {
    echo '<style>
   td.plugin-update { display: none; }
   .yoast-notice-error { display: none; }
   .update-nag { display: none; }
   .toolset-notice { display: none; }
  </style>';
}

add_action( 'admin_head', 'my_custom_styles' );

// Remove Other Plugin Nags
add_action ('admin_footer', 'my_custom_scripts');

function my_custom_scripts() {
    $script= '<script>
    jQuery( "p:contains(\'license key\')" ).parent().hide();
    jQuery( "p:contains(\'Connect your store\')" ).parent().hide();
    jQuery( "p:contains(\'updates and support\')" ).parent().hide();
    jQuery( "p:contains(\'activate your license\')" ).parent().hide();
    jQuery( "p:contains(\'update your license\')" ).parent().hide();
    jQuery( "h2:contains(\'Register for News\')" ).parent().parent().hide();
    </script>';
    echo $script;
}
 
Add the following into your functions.php for active theme.
PHP:
add_action('admin_head', 'bc_disable_notice'); function bc_disable_notice() { ?> <style> .notice { display: none;} </style> <?php }
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock