By default, WordPress shows admin toolbar to Administrator, Editor, or Author but not to Subscriber or unauthenticated visitors.
What determines whether admin toolbar is shown a logged-in user? I am wondering if it works based on Role, a specific Capability, or something else. I tried to dig in WordPress core source code to find out but I could not get any clue.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
The admin toolbar is displayed for all users, including Subscribers.
If it’s not appearing on your site, then you are likely be using a plugin that changes this behaviour. For example, WooCommerce hides the admin bar from users who do not have the edit_posts or manage_woocommerce, capability. They have a support article on disabling this behaviour here.
Other plugins, such as membership plugins, might do something similar. You would need to check them individually.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0