How can I check if the admin bar is visible to the current user?

I’m new to WordPress. I would like to know

  • Is the admin bar visible to all users and roles?
  • If not, how can I check it is visible to the current user?

1 Answer
1

Just use is_admin_bar_showing() to check if the currently logged in user is

  1. logged in
  2. has activated the admin bar in his user settings/preferences

Leave a Comment