Im using Redux Framework and Trying to Activate or Deactivat wordpress admin bar with this function
if( !function_exists('mytheme_admin_bar') ){
function mytheme_admin_bar(){
global $optname;
if( $optname['hide_admin_bar'] == 1 && !current_user_can('manage_options') ) {
return true;
} else {
return false;
}
}
add_filter( 'show_admin_bar' , 'mytheme_admin_bar');
}
Thats working fine but Im confused because when The value is false its hiding the admin bar also for Administrator do u have any idea how to make a function like this but to effect to all users except Administrator, I dont want to hide admin bar for admins
thankyou