Home / Admin / Hide all admin notices and notifications
Duplicate Snippet

Embed Snippet on Your Site

Hide all admin notices and notifications

The code below can hide all notices, error notices, warnings, update notices, etc, from the WP admin.

Code Preview
php
<?php
function wpcb_hide_admin_notices() {
    ?>
    <style>
        .notice,
        .notice-error, 
        .notice-warning, 
        .notice-success, 
        .notice-info, 
        .error,
        .update-nag {
            display: none !important;
        }
    </style>
    <?php
}
add_action('admin_head', 'wpcb_hide_admin_notices', 5 );

Comments

Add a Comment