Many times I have been asked by friends if there is a simple and better way to remove the admin toolbar which is found on top of your wordpress website/ blog.
Well, here is a simple way you can use to remove the toolbar.
Open your theme functions.php file and paste the below function at the footer of the file:
add_action(‘after_setup_theme’, ‘remove_admin_bar’);
function remove_admin_bar() {
if (!current_user_can(‘administrator’) && !is_admin()) {
show_admin_bar(false);
}
}
And Save.
[Please Note : You need to make a backup of the functions.php file before you add or remove any code]