BuddyBoss Home – Web › Support Forums › Themes › OneSocial theme › Black tool bar appearing for non admin users
Tagged: admin tool bar, black tool bar
- This topic has 14 replies, 6 contibutors, and was last updated 8 years, 8 months ago by Anonymous.
Question
March 9, 2016 at 2:29 pm #62254@conscious-craftiesHello,
I’m a WCVendors customer. Since switching to One Social theme, a black toolbar appears for non logged in members (with log in/register options) and for logged in Vendors (with the option of Add New, Post, Media or Product etc).
This is very confusing as my Vendors add product via the Product-edit.pho product listing screen and they can add posts via the User Blog write a story icon.
Also the SEO option has lots of things in the drop down that aren’t useful to my vendors.
In wp-admin there is an option in WCVendors settings to prevent Vendors accessing wp-admin. When this was ticked previously the black tool bar did not appear.
Please can you tell me how I can remove the black bar from appearing for logged in users (apart from admins).
See screenshots,
Thank you,
Karen
Answers
March 9, 2016 at 2:39 pm #62260@uwethwpHi @conscious-crafties, please double check your settings in WP/buddyboss/onesocial theme … see screenshot attached. Best Uwe
March 9, 2016 at 3:29 pm #62268@conscious-craftiesAwe thanks for jumping in to help Uwe 🙂
Unfortunately that turns it off for Admins too and I need the admin bar to be able to quickly edit products whilst on the product page.
Thanks tho,
Karen
March 9, 2016 at 3:38 pm #62269@uwethwpHi Karen,
I see. Hmmm… I know there are several plugins for this.e.g. https://de.wordpress.org/plugins/global-admin-bar-hide-or-remove/
Please check the one suitable for you.
Thx Uwe
March 10, 2016 at 1:57 am #62305@crissfredHi Karen ,
Try this in custom code css:
#wp-admin-bar-user-actions {
display: block !important;
}
#wp-admin-bar-user-info {
display: none !important;
}#wp-admin-bar-edit-profile {
display: none !important;
}#wp-admin-bar-logout {
display: none !important;
}
#wpadminbar {
display: none;
}March 10, 2016 at 4:41 am #62313@conscious-craftiesHi Frandes,
Thank you for your help. It did remove the black tool bar but left a white empty space instead.
Also it removed it for admins too
and I noticed it made my log in screen transparent and removed the logo from the log in screen.
(see screenshots)Ideally what I need to do is switch off the tool bar to all users EXCEPT admin and authors.
Before switching to One Social theme, my WCVendors settings removed the black tool bar.Thank you,
Karen
March 10, 2016 at 5:04 am #62319@conscious-craftiesYay I’ve sorted it!
There’s a tick box against each user to display tool bar or not. I just need to go through all 100 members now!
(see screenshot) this was found in wp-admin/users
Karen
March 10, 2016 at 5:06 am #62322@conscious-crafties@uwethwp this also removed all the option in the profile menu under the user (to the right)
I’m going to have a play today as I think we can create a new menu and set the location to Profile menu…Karen
March 10, 2016 at 6:06 am #62336@conscious-craftiesI’ve been able to remove the admin bar for all users apart from admin now using my User Role plug in (ticking hide admin bar) – phew!
March 10, 2016 at 6:18 am #62340@
AnonymousHi @conscious-crafties, To disable Admin Bar for All Users Except for Administrators please paste this code in your theme’s functions.php file..
add_action('after_setup_theme', 'remove_admin_bar'); function remove_admin_bar() { if (!current_user_can('administrator') && !is_admin()) { show_admin_bar(false); } }
Regards
March 10, 2016 at 7:21 am #62352@conscious-craftiesThank you Pallavi, is there a way to display the admin bar to Admins AND authors? sorry I don’t yet know php.
If I amend the code to this will it work (adding ‘author’ after ‘administrator’)?
add_action('after_setup_theme', 'remove_admin_bar'); function remove_admin_bar() { if (!current_user_can('administrator, author') && !is_admin()) { show_admin_bar(false); } }
March 10, 2016 at 12:34 pm #62401@georgeallen003This code did NOT work for me, guests see the black admin bar.
@conscious-crafties which user role plugin are you using? And does it hide the admin bar from guests browsing the site?March 10, 2016 at 12:50 pm #62405@georgeallen003Nevermind, I found the setting in the Buddypress options section to remove the toolbar for non-logged in users.
Thats all I needed for now.
Thanks
March 10, 2016 at 1:25 pm #62408@conscious-craftiesHi George,
If you need to remove it for logged in users (apart from admin) this is how I did it:
TWO options..
If you don’t have many users go to wp-admin and go to Users.
Select user and uptick the option ‘Show Toolbar when viewing site’If you have lots of users like me and you don’t fancy doing this for every user, then download this User Roles plug in:
https://wordpress.org/plugins/user-role-editor/You then get an option under Users within wp-admin for User Role Editor. Select that.
Then for ‘Select Role and change its capabilities’ select the role type you want to remove the admin bar for (I chose Vendors).
Scroll to the bottom and TICK ‘Hide Admin Bar’I then repeated this for ‘Customers’ so it didn’t confuse them too!
Hope that helps,
Karen
March 18, 2016 at 12:31 pm #63873@
AnonymousThanks for your help @conscious-crafties
I will close this thread, Feel free to create new for any further queries.
Regards
Varun Dubey
- The question ‘Black tool bar appearing for non admin users’ is closed to new replies.