The WPFolks app is out on iPhone and Android. Free, no ads. Download on the App Store Get it on Google Play
Skip to main content
Login Join
Snippet · PHP

Hide WordPress Admin Notices for Editor Users

Shared by Sumit Javia | Senior WordPress Developer · May 23, 2026 · Updated May 23, 2026 · @admin_init

59 views
Back to Snippets

2 approaches to this. Compare them and pick what fits your setup.

This snippet removes all admin notices and dashboard notifications for users with the Editor role in the WordPress admin panel. It helps create a cleaner and distraction-free admin experience by hiding plugin, theme, and core notices from editor-level users.

/**
 * Hide all WordPress admin notices for editor users.
 *
 * Removes plugin, theme, and core admin notices from the dashboard
 * for users who have the Editor capability to provide a cleaner
 * admin experience.
 *
 */
function sj_hide_admin_notices_for_editors() {

    // Check if the current logged-in user has editor access.
    if ( current_user_can( 'editor' ) ) {

        // Remove all admin notice actions.
        remove_all_actions( 'admin_notices' );
        remove_all_actions( 'all_admin_notices' );
    }
}

add_action( 'admin_init', 'sj_hide_admin_notices_for_editors' );
Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

0 comments