The toolbar is very important since it allows users to access WordPress admin panel of a website. However, for some reasons, you might want to hide the toolbar from all users. Therefore, we will take you on a walkthrough this.
How to Hide Toolbar From All Users
1. Hide Toolbar from specific users:
The toolbar is showing as default for the users after they log in. You can hide Toolbar from specific users by disabling the Toolbar option in the user profile.
2. Hide the Toolbar from all users (except for admin)
It takes lots of time to hide Toolbar from all users one by one. You can hide Toolbar from all users (except for admin) at once just by some lines of code :)
– Install Child Theme (Dashboard >> Eduma >> Child Themes).
– In the functions.php file of the child theme, put the following code:
if ( ! current_user_can( 'manage_options' ) ) {
add_filter('show_admin_bar', '__return_false', 1000);
}
Done! Now, the Toolbar is hidden from all users.
ThimPress Development Team