Viewing 8 replies - 1 through 8 (of 8 total)
  • When you are signed in?

    Thread Starter yzkoh

    (@yzkoh)

    I mean when I am signed in, I go to Dashboard-> User and edit my profile. I chose to hide toolbar but it does not work, even few plugins I downloaded cant work as well. I want hide the admin bar from customers ( I am using woocommerce ) but I cant do that. Do you have any idea?

    Customers will not see the toolbar. Only you do when signed in.

    Thread Starter yzkoh

    (@yzkoh)

    Okay, but here is the problem. Customers have to sign in as well, therefore they could see the toolbar. I tried to use some plugins to hide it from ‘customer’ role but it does not work. However, this method works for the previous version of wordpress.

    They don’t sign in as admin. The toolbar should only reflect the customer’s role.

    What eCommerce plugin are you using?

    to be sure, you can log out, register yourself as a new user, log back in with the new user account and you will see exactly what they would.

    Thread Starter yzkoh

    (@yzkoh)

    Yes, customers cant access to the admin dashboard,but the toolbar (the black color bar which fixed at the top when viewing the site) still showing. Is there anyway to hide it when signed in as customer?

    Hello yzkoh
    You can determine for which users the admin bar is shown. Put the following lines in your theme’s functions.php and it is only shown to users having capability ‘manage_options’

    if ( ! current_user_can( 'manage_options' ) ) {
        show_admin_bar( false );
    }

    hope it will help you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Unable to hide toolbar when viewing site’ is closed to new replies.