Created
April 4, 2017 00:53
-
-
Save trevorgreenleaf/cc468cbe164026987dce796fd0f9876e to your computer and use it in GitHub Desktop.
Hide wp bar for non admins
This file contains 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
add_action('set_current_user', 'cc_hide_admin_bar'); | |
function cc_hide_admin_bar() { | |
if (!current_user_can('edit_posts')) { | |
show_admin_bar(false); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment