Admin Bar Visibility Issue for Invited Users on Main Site in Multisite with Bran
-
Hi!
In my WordPress Multisite setup, users invited to a subsite with a custom assigned role by the admin of a subsite who has registered via the main site do not see the admin bar on the main site when Branda is activated. The admin of the subsite see the admin bar without issues, but not the invited user. Branda Settings: In Network Admin > Branda > Admin Area > Admin Bar > Toolbar Visibility, I have enabled visibility for all roles except Guest (front-end and back-end).
Disabling Branda or the Admin Bar module restores the admin bar for invited users on the main site. Invited users have custom roles on the subsite but no explicit role on the main site.
EInvited users with roles like Stock Manager or Full Manager should see the admin bar on the main site, as per the Toolbar Visibility settings. Can you let me know if this is a bug? If so, may you provide a fix or workaround to ensure invited users see the admin bar on the main site without disabling Branda? If this requires a configuration change, please advise on the exact settings.
Thank you so much for your help!
The page I need help with: [log in to see the link]
-
Hi @evo252
I hope you are doing well today.
I suspect that we talk about multisite installation with WooCommerce setup. If so, after fresh setup on my lab, the only additional role from WooCommerce is Shop Manager. I took a quick test, and that role is able to see the admin bar on the front side and in the backend.
Couple of questions:
- Stock Manager and Full Manager roles: did you register them by some plugin? If so, which one?
- Can you enable the Admin Bar module once more and disable all other plugins one by one to see which one possibly conflicts with Branda? If possible, test this on the staging site, to not affect the live multisite.
I have a feeling that we talk about some custom roles here, which are added by a 3rd party plugin, and we need more details to replicate this on the lab.
Kind Regards,
KrisThank you for your prompt response and suggestions. I’ve conducted additional tests and have clarifications to help replicate and resolve the issue.
New Tests and Findings:
- I’ve confirmed that the issue stems from invited users on a subsite (e.g., with custom roles like “stock manager” or even the standard subscriber role) not having a role assigned on the main site (blog ID 1). This occurs when adding users via WordPress Multisite’s standard interface (Users > Add New on a subsite).
- For example, adding a user with the subscriber role directly on a subsite via Users > Add New assigns the role on the subsite but none on the main site, and the admin bar does not appear on the main site’s frontend with Branda activated.
- Manually assigning a role (e.g., subscriber) on the main site makes the admin bar reappear, confirming that Branda seems to require a local role on the main site to display the admin bar.
- This suggests a limitation in Branda, where the admin bar logic (likely via the show_admin_bar filter) checks roles on the current site (main site) rather than network-wide or subsite roles, despite Toolbar Visibility being set to allow all roles except Guest.
Additional Clarifications:
- No WooCommerce: My setup does not use WooCommerce, so the Shop Manager role is not relevant. Instead, I use my custom plugins which define custom roles (Stock Manager, Order Manager, Full Manager, etc.). However, the issue occurs even with the standard subscriber role, so the custom roles are not the cause.
- Conflict Tests: On a staging site, I disabled all plugins but the issue persists: users invited to a subsite without a main-site role do not see the admin bar on the main site’s frontend. Without Branda, the default admin bar displays correctly for these users, confirming the issue is specific to Branda. The problem is that I would like to show the custom admin bar for subsite users from any page of the network, both in subsite or main site.
Questions and Requests:
- Can you confirm if Branda intentionally requires a role on the main site to display the admin bar in Multisite, or is this a bug in recognizing subsite roles?
- Is there a setting, filter, or hook in Branda (e.g., modifying the show_admin_bar filter) to allow the admin bar to display for users with subsite roles, without needing a main-site role?
- If this is a bug, could you provide a fix in an upcoming update?
- If it’s an intentional limitation, could an option be added to Toolbar Visibility to enable recognition of subsite roles on the main site?
Current Workaround: I’m considering automatically adding a subscriber role on the main site for all invited users (via add_user_to_blog in my custom code or a global hook). This might work, but I’d prefer a native Branda solution to align with WordPress Multisite’s default behavior, where users don’t necessarily have a main-site role. Can you advise if this is the best approach or suggest an alternative?
Thank you so much for your help and for your fantastic plugin! I’m happy to provide a staging site or debug logs if needed.
Best regards,
Hi @evo252,
Thank you for getting back to us with further clarification.
What you have observed is an expected behaviour as you have excluded “Guest” from Tool Bar visibility. Please note that, as far as the newly added subscribers do not have access to the main website, the user is a guest only. Since you have excluded “Guest” from accessing the Tool Bar in Branda, they will not be able to see the admin bar. Please try enabling the Tool Bar access for “Guest” at Network Admin >> Brand >> Admin Area >> Admin Bar >> Toolbar Visibility, that should resolve the issue.
Please feel free to get back to us if you need any further clarification.
Best Regards,
Nebu JohnThank you for your clear and detailed explanation regarding the admin bar visibility issue. I now understand that this is expected behavior in Branda: since users invited to a subsite without a role on the main site (blog ID 1) are considered “Guests” on the main site, and my Toolbar Visibility settings exclude “Guest” from seeing the admin bar, these users cannot see it on the main site’s frontend. This makes perfect sense, and I appreciate your help in clarifying this.
I have one follow-up question: Is there a way, through a setting, filter, hook, or custom code, to display a universal admin bar for all network members, including users who are only registered on subsites and have no role on the main site? Ideally, I’d love for all logged-in users across the network to see the admin bar on the main site’s frontend, regardless of whether they have a specific role on the main site, to ensure a consistent user experience.
If this isn’t currently possible, would it be feasible to consider adding such an option in a future update of Branda, perhaps as a toggle in Toolbar Visibility to include all network-registered users? I believe this could benefit other Multisite users with similar setups.
Thank you again for your excellent support and fantastic plugin!
Regards,
Hi @evo252,
Wouldn’t enabling visibility of the Toolbar for “Guests” help with this? When Guest access is enabled, any user from the network can see the Toolbar if they are on the main site, and it will be visible to logged-in users only. Isn’t this what you are expecting? Can you please provide more clarification?
Best Regards,
Nebu JohnThank you for your follow-up and clarification. I understand that enabling Guest access in Toolbar Visibility allows all network users, including subsite-only users, to see the admin bar on the main site’s frontend. However, the default admin bar shown to subsite-only users (with the “My Sites” menu) is not customizable in Branda and doesn’t meet my needs, as I am looking for a way to customize a top bar for all users of my network.
I’d like to explore two alternative customization options for the admin bar on the main site’s frontend:
- Option 1: Display a customized admin bar for non-logged-in “Guests” (e.g., with a login link) and, for all logged-in users (including those with roles only on subsites), show the same admin bar configured for users with a role on the main site (e.g., the one defined for subscriber or other roles in Toolbar Visibility).
- Option 2: Hide the admin bar entirely for non-logged-in “Guests” and show the admin bar configured for main-site users (e.g., for subscriber) for all logged-in users, including subsite-only users, instead of the default “My Sites” bar.
Is there a setting, filter, or hook in Branda to achieve either of these options, allowing me to bypass the non-customizable “My Sites” bar for subsite-only users? If not, could this be considered as a feature for a future update?
Thank you for your continued support and excellent plugin!
Hello @evo252
I’m afraid option one wouldn’t be possible and there is not option for that out of the box.
For option two, you can use the available options under Branda -> admin bar however the “My Sites” can’t be edited, I will ask our Branda development team to review your request, and will get back to you once we have more information.
Best Regards
AminThank you for your detailed response and for escalating my request to the Branda development team. I appreciate your efforts and understand that Option 1 is not currently possible, and that the “My Sites” menu in Option 2 cannot be edited out of the box.
I’m grateful for your team’s consideration of this feature request. Please keep me updated on any feedback or potential updates from the development team regarding the possibility of customizing or removing the “My Sites” menu for subsite-only users, or enabling a universal admin bar for all logged-in network users based on the main site’s configuration.
In the meantime, I’ll explore custom code to hide the admin bar for non-logged-in “Guests” and adjust the bar for logged-in users to align with my needs. If you have any temporary workarounds (e.g., filters or hooks) to remove “My Sites” or better align the bar for subsite-only users, I’d be happy to test them.
Thank you again for your excellent support and for passing this along to the team!
Best regards,
Hello @evo252
We got further feedback from our team. Both options need custom coding, I’m afraid this will be outside the scope of support we can provide. For that, you’ll need to hire a developer to provide the required custom code for you. WordPress provides a jobs directory here https://jobs.wordpress.net/, if you need further advice about it, feel free to email
wpsupport@incsub.com.Subject: ATTN: WPMU DEV support – wp.org
You can try using this hook to remove the ‘My Sites’ item, and combine it with custom menu items that have Visibility based on Role.
https://developer.wordpress.org/reference/hooks/admin_bar_menu/
Note: we are still considering them as feature requests; however can’t give you any promises or ETA about their implementation.
Best Regards,
AminHello!
Thank you for the detailed feedback and for escalating my request to your team. I appreciate your clarification that both options require custom coding and your suggestion to use the admin_bar_menu hook, as well as the link to the WordPress jobs directory.
I’m grateful that you’re considering these as feature requests! In the meantime, I’m all set with a temporary solution and will explore custom coding as needed 🙂
Thank you again for your excellent support and for taking the time to review my request!
Best regards,
The topic ‘Admin Bar Visibility Issue for Invited Users on Main Site in Multisite with Bran’ is closed to new replies.