Jun 07, 2018 10:37 pm
I'm curious if there is any work around with code or other means to allow the admin bar for editors without enabling for all members?
1 Reply
Jun 10, 2018 9:09 am
You can use this code in your current active theme functions.php
function my_admin_bar_control_function() {
if (current_user_can('administrator') || current_user_can('editor') ) {
show_admin_bar(true);
} else {
show_admin_bar(false);
}
}
add_action('init', 'my_admin_bar_control_function', 20);
How to Easily Add Custom Code in WordPress (without Breaking Your Site)