Hi I am trying to show admin bar to editors, but is not working. I am using Buddypress pluging. I dont know if this is the reason but I cant show admin bar for editors and admin. Anybody can help me?


add_action('wp_head', 'show_top_admin_menu_bar', 100);

function show_top_admin_menu_bar() { if (current_user_can('editor')) { show_admin_bar(true); } }

1 Answer 1


Please see https://codex.wordpress.org/Function_Reference/show_admin_bar.

With newer version of WordPress you may need to use the following which will leave the Toolbar available in the Dashboard but hide it on all front facing pages.

So instead of show_admin_bar(true); you can use add_filter('show_admin_bar', '__return_true');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.