BuddyBoss Home – Web Support Forums Themes OneSocial theme Black tool bar appearing for non admin users

Viewing 15 posts - 1 through 15 (of 15 total)
  • Question

    #62254
    @conscious-crafties

    Hello,

    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

    #62260
    @uwethwp

    Hi @conscious-crafties, please double check your settings in WP/buddyboss/onesocial theme … see screenshot attached. Best Uwe

    #62268
    @conscious-crafties

    Awe 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

    #62269
    @uwethwp

    Hi 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

    #62305
    @crissfred

    Hi 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;
    }

    #62313
    @conscious-crafties

    Hi 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

    #62319
    @conscious-crafties

    Yay 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

    #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

    #62336
    @conscious-crafties

    I’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!

    #62340

    Anonymous
    @

    Hi @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

    #62352
    @conscious-crafties

    Thank 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);
    }
    }
    #62401
    @georgeallen003

    This 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?

    #62405
    @georgeallen003

    Nevermind, 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

    #62408
    @conscious-crafties

    Hi 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

    #63873

    Anonymous
    @

    Thanks for your help @conscious-crafties

    I will close this thread, Feel free to create new for any further queries.
    Regards
    Varun Dubey

Viewing 15 posts - 1 through 15 (of 15 total)
  • The question ‘Black tool bar appearing for non admin users’ is closed to new replies.