WordPress Hide Admin Bar

WordPress Hide Admin Bar - WordPress Hide Admin Bar

This post was last updated on March 28th, 2022 at 04:29 am

add_filter( 'show_admin_bar', 'hide_admin_bar_from_non_admins');
function hide_admin_bar_from_non_admins() {
    return ! ( ! current_user_can( 'manage_options' ) );

Disable Admin Bar for All Users

To disable it for all users, then simply put use this code in your theme’s functions.php file.

/* Disable WordPress Admin Bar for all users. */
add_filter('show_admin_bar', '__return_false');

wordpress hide admin bar - WordPress Hide Admin Bar

My Plugin to Hide or disabled WordPress Admin Bar.

This plugin will help to hide or disable WordPress admin bar for all user or based on selected user roles and user capabilities.

About This Author

My name is Parameshwar Roy (P. Roy), and I am a web developer. This is my personal blog to record my own thoughts. Though I am not a natural writer, I love to share my experiences. Hope my experiences will be useful to you...read more about me

Leave A Reply