Top admin tool bar not displaying for "Editor" user role

To handle user role permissions - I decided that not all of 50 users should have Administrative roles - Most of our user are Editors and so I switched them from an Administrative role to Editor.

Problem now is that the Editor users don't have access to the top tool bar. (They had access to it when they are an Administrator role).

What I tried so far

  • I made sure that Show Toolbar when viewing site has been checked.
  • I disabled all of the plugins in a staging env until the site crashed.
  • Switched to a new theme (and it worked)

Any troubleshooting ideas would be most welcome

Also - Is there any php documentation that pertains to this feature? How would one insure that users have access to the top admin tool bar when developing a theme with php?

Topic admin-bar Wordpress

Category Web


Looks like i found the piece of code causing the issue :

function remove_admin_bar() {

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

I switched show_admin_bar(false);

to

show_admin_bar(true);

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.