Put this in your theme’s functions.php: show_admin_bar(false);
Well I want to remove the tool bar only for Subscribers not for Admin.
is there anyway please help me
if (!current_user_can('administrator')) { show_admin_bar(false); }
or
if (!current_user_can('manage_options') ) { show_admin_bar(false); }
is it like this
show_admin_bar(false);
if (!current_user_can(‘administrator’)) { show_admin_bar(false); }
/
show_admin_bar(false);
if (!current_user_can(‘manage_options’) ) { show_admin_bar(false); }
Can you please Check my Code because its not working
The tool bar is not showing for me (Administrator )
Try this one in functions.php :
if (!current_user_can('manage_options') ) { show_admin_bar(false); }
I had used like this and it not working.
“show_admin_bar(false);
if (!current_user_can(‘manage_options’) ) { show_admin_bar(false); } “
and its still hiding the tool bar for me 🙁
not:
show_admin_bar(false);
if (!current_user_can('manage_options') ) { show_admin_bar(false); }
but only:
if (!current_user_can('manage_options') ) { show_admin_bar(false); }
You’re welcome. I’m glad you got it resolved.