Remove Admin Bar for all Users
-
Hi Guys,
I seem to be having a problem with removing the Admin Bar that runs across the front end site.
I am wanting to remove this and have tried almost every way I have read online.
Here are the steps I have done already:
1)
// Only display to administrators add_action('after_setup_theme', 'remove_admin_bar'); function remove_admin_bar() { if (!current_user_can('administrator') && !is_admin()) { show_admin_bar(false); } }
2)
// Disable for specific role (in this case, 'subscriber') function remove_admin_bar() { $user = wp_get_current_user(); if (in_array(‘subscriber’, $user->roles)) { show_admin_bar(false); } }
3)
add_filter('show_admin_bar', '__return_false');
4) Installed various plugins such as: Disable WP Admin Bar Removal – Remove Admin Bar – Global Hide Admin Bar and etc.
I cannot seem to get this bar removed. Has something changed in the code?
There is an option to Hide the bar in the user profiles, I do not want to do this everytime someone new joins the site as it is a magazine site.
Thanks
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Remove Admin Bar for all Users’ is closed to new replies.