最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

What determines whether admin toolbar is shown to a logged-in user?

programmeradmin6浏览0评论

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.

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.

Share Improve this question asked Jul 22, 2020 at 3:05 ronnefeldtronnefeldt 1155 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

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.

发布评论

评论列表(0)

  1. 暂无评论