WordPress Hide Admin Bar

WordPress Hide Admin Bar - WordPress Hide Admin Bar

Hide / Disable Admin Bar for All Users Except for Administrators. Paste this code in your theme’s functions.php file

add_action('after_setup_theme', 'remove_the_admin_bar');
function remove_the_admin_bar() {
    if (!current_user_can('administrator') && !is_admin()) {
        show_admin_bar(false);
    }
}

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. */
show_admin_bar(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