Way 1 : Using Admin panal
To remove the toolbar from frontend, Navigate to Users > Your Profile. Scroll down to “Toolbar” and Uncheck “Show Toolbar when viewing site.”
Save the setting by clicking update profile button at the bottom.
WAY 2 : Paste this code in your theme’s functions.php
add_filter('show_admin_bar', '__return_false');
WAY 3 : Disable Admin Bar for All Users Except for Administrators
add_action('after_setup_theme', 'remove_admin_bar'); function remove_admin_bar() { if (!current_user_can('administrator') && !is_admin()) { show_admin_bar(false); } }
OR : Disable Admin Bar for All Users
/* Disable WordPress Admin Bar for all users but admins. */ show_admin_bar(false);
0 Comments