Skip to content

Instantly share code, notes, and snippets.

@JohnBunka
Last active Aug 29, 2015
Embed
What would you like to do?
WordPress: Remove Admin Bar For Subscribers
//* NOTE: Add to functions.php or to a functionality plugin
//*Remove Admin Bar For Subscribers
add_action('after_setup_theme', 'remove_admin_bar');
function 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