Each user can disable it going to their profile screen and unchecking the option "Show Toolbar when viewing site".
http://YOUR_WEBSITE_URL/wp-admin/profile.phpBut If you want to disable WordPress Toolbar for all users, then simply add this code in your theme's functions.php file:
add_filter('show_admin_bar', '__return_false');To Disable toolbar for all users except your site administrators, add below code instead of above one:
if ( ! function_exists( 'disable_remove_tool_bar' ) ) : function disable_remove_tool_bar() { if (!current_user_can('administrator') && !is_admin()) { add_filter('show_admin_bar', '__return_false'); } } endif; add_action('after_setup_theme', 'disable_remove_tool_bar');
1 Comments
Nice post.
ReplyDelete