Title: Impossible to hide admin bar
Last modified: August 30, 2016

---

# Impossible to hide admin bar

 *  [maudco](https://wordpress.org/support/users/maudco/)
 * (@maudco)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/impossible-ti-hide-admin-bar/)
 * Hi,
 * I added the code below to hide admin bar for non amdins, but it doesn’t work.
   
   I turned off all the plugins, but it change nothing. I also tested plugins to
   hide admin bar and it doesn’t work neither.
 * add_action(‘after_setup_theme’, ‘remove_admin_bar’);
 * function remove_admin_bar() {
    if (!current_user_can(‘administrator’) && !is_admin()){
   show_admin_bar(false); } }
 * I don’t understand why I cannot hide it :/

Viewing 1 replies (of 1 total)

 *  [stephenaturner999](https://wordpress.org/support/users/stephenaturner999/)
 * (@stephenaturner999)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/impossible-ti-hide-admin-bar/#post-6812011)
 * Hello
 * You mention you’ve tried plugins but there are a lot of options that should work
   to do this, such as this one: [https://wordpress.org/plugins/wp-admin-bar-removal/](https://wordpress.org/plugins/wp-admin-bar-removal/)—
   did you try many plugins?
 * Otherwise, you might want to try the code suggested here [http://www.wpbeginner.com/wp-tutorials/how-to-disable-wordpress-admin-bar-for-all-users-except-administrators/](http://www.wpbeginner.com/wp-tutorials/how-to-disable-wordpress-admin-bar-for-all-users-except-administrators/)
   in your functions.php file. You don’t mention where you put in your sample code
   but functions.pho would be the place to do it.
 * If none of those options are working it sounds like you may have some kind of
   theme conflict. Are you using a custom theme or a common theme? Maybe you should
   try switching to a simple theme like Twenty Fifteen just to test if your existing
   theme is causing some kind of conflict.
 * Steve.

Viewing 1 replies (of 1 total)

 The topic ‘Impossible to hide admin bar’ is closed to new replies.

## Tags

 * [hide](https://wordpress.org/support/topic-tag/hide/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [stephenaturner999](https://wordpress.org/support/users/stephenaturner999/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/impossible-ti-hide-admin-bar/#post-6812011)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
