Skip to content

Instantly share code, notes, and snippets.

@nairnwebdesign
Created December 28, 2013 08:21
Show Gist options
  • Save nairnwebdesign/8157297 to your computer and use it in GitHub Desktop.
Save nairnwebdesign/8157297 to your computer and use it in GitHub Desktop.
Remove the WordPress toolbar from the top of the screen, unless user is an Administrator.
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