Created
March 10, 2013 00:47
-
-
Save WebEndevSnippets/5126553 to your computer and use it in GitHub Desktop.
WordPress: Hide Toolbar (Admin Bar) on front end for all except Administrators
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_filter( 'show_admin_bar' , 'webendev_hide_admin_bar'); | |
/** | |
* Hide Toolbar (Admin Bar) on front end for all except Administrators | |
* | |
*/ | |
function webendev_hide_admin_bar($content) { | |
return ( current_user_can( 'administrator' ) ) ? $content : false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment