joelkrause
8/20/2019 - 9:13 AM

Remove admin bar for non-admin users

Remove admin bar for non-admin users

add_action('after_setup_theme', 'remove_admin_bar');
function remove_admin_bar() {
    if (!current_user_can('administrator') && !is_admin()) {
    show_admin_bar(false);
    }
}