Created
November 17, 2017 11:02
-
-
Save nschaeferhoff/aeca664a7f82e77ce0b911994b5d0b55 to your computer and use it in GitHub Desktop.
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
function conditionally_remove_admin_bar() { | |
if (!current_user_can('administrator') && !is_admin()) { | |
show_admin_bar(false); | |
} | |
} | |
add_action('after_setup_theme', 'conditionally_remove_admin_bar'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment