Created
March 22, 2013 05:32
-
-
Save spencejs/5219171 to your computer and use it in GitHub Desktop.
Hide Admin Bar Except For Administrators In Wordpress
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
| //Hide Admin Bar Except For Administrators | |
| function my_function_admin_bar($content) { | |
| return ( current_user_can("administrator") ) ? $content : false; | |
| } | |
| add_filter( 'show_admin_bar' , 'my_function_admin_bar'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment