Last active
August 29, 2015 14:06
-
-
Save edheltzel/4e70da8c405e26c42833 to your computer and use it in GitHub Desktop.
Disable the Wordpress Admin Bar for ALL Users except Admin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action('after_setup_theme', 'rdm_remove_admin_bar'); | |
| function rdm_remove_admin_bar() { | |
| if (!current_user_can('administrator') && !is_admin()) { | |
| show_admin_bar(false); | |
| } | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment