Created
December 9, 2015 09:12
-
-
Save celticwebdesign/2e59c8a030807ec7de00 to your computer and use it in GitHub Desktop.
WordPress remove admin bar
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
// Remove Admin bar | |
function remove_admin_bar() | |
{ | |
// return true; | |
if (!current_user_can('administrator') && !is_admin()) { | |
return false; | |
} else { | |
return true; | |
} | |
} | |
add_filter('show_admin_bar', 'remove_admin_bar'); // Remove Admin bar | |
// add to functions.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment