Created
October 9, 2014 16:38
-
-
Save JiveDig/291a81a59ef800acf459 to your computer and use it in GitHub Desktop.
Diable toolbar 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
<?php | |
//* Disable toolbar for non admins | |
add_action('after_setup_theme', 'mwm_remove_admin_bar'); | |
function mwm_remove_admin_bar() { | |
if ( !current_user_can('administrator') && !is_admin() ) { | |
show_admin_bar(false); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment