• Resolved Dam

    (@damf77)


    Hello how are you? Please, I need to hide the admin bar for all users and only be visible to the administrator, how can I do it? Thank you in advance.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 15 total)
  • I can’t see the admin bar when I view the page… You must be logged into the admin area ??

    Robin

    (@emazharulislam)

    Hello @damf77,

    Admin can Select user by roles, who can view admin bar in the frontend. Check this screenshot to get the settings.

    Thanks.

    Thread Starter Dam

    (@damf77)

    I’m sorry but even though I only choose the “Administrator” option in the SHOW ADMIN BAR field, the admin bar is still visible to my users (subscribers). Can I solve it in some way? Thank you.

    I have the same issue. Everything was fine until I updated to the latest version of WP User Frontend Pro. The only way to hide the wordpress nav bar is to deactivate the plugin – am running Dokan Pro as well. Please advise…

    Robin

    (@emazharulislam)

    Hello @damf77,

    Probably you have marked as checked the Toolbar from the User Profile. Click here to check the Toolbar option. As the Toolbar is the WordPress core option, this will get higher priority. I mean the Toolbar configuration will override the WPUF settings.

    Thanks.

    @emazharulislam You’re not listening… both @damf77 and I have the same issue – The latest update to the WP User Frontend plugin created the following problems.

    1) The WordPress Admin panel /tool bar is NOW displayed to all users that are logged in, regardless of whether or not the tool bar setting is disabled.

    2) The Post function is broken – when you click Post, a 404 error or Page Cannot Be Found error is displayed, which impacts Dokan Pro users too if they are running both plugins, which is what I’m doing.

    The above two issues are as a result of the plugin update from January 31st or February 1st.

    Thread Starter Dam

    (@damf77)

    Hello, I hope that this problem can be solved soon, for the moment I have chosen to place the following code snippet in the functions file of my child theme and it works perfect:

    // show admin bar only for admins
    if (!current_user_can(‘manage_options’)) {
    add_filter(‘show_admin_bar’, ‘__return_false’);
    }

    Thanks.

    @damf77 Thank you for posting a workaround – I will implement it now.

    @emazharulislam – Please advise as to when this issue will be resolved.

    • This reply was modified 6 years, 1 month ago by bennieblvnco.

    I ended up installing the plugin called “Hide Admin Bar from Non-Admins“, which addressed the problem.

    Hello @bennieblvnco @damf77 and @eviebpat

    Actually, there has a workout for the toolbar issue. Let me describe it ??

    WordPress has an option to show the toolbar for the specific user. This can be found on the user profile like this-> https://prntscr.com/mg1g2z

    Also, WPUF has the toolbar hiding option. So, if someone hides the toolbar using the WPUF settings, but the user has this option ticket/enabled, the WPUF settings won’t work. It will get the WP settings priority first.

    So, you’ll need to disable the ‘Show toolbar when viewing the site’ from the user profile first in order to get the WPUF toolbar settings works.

    Now, you can ask why it was working earlier. I know but it was an issue! The WP toolbar settings were not working if someone used the WPUF toolbar settings. We have just fixed this and we had to give the WP settings priority first.

    I hope this clear now ??

    Thanks

    Thread Starter Dam

    (@damf77)

    Thanks @thebengalboy ??

    Appreciate the quick response @thebengalboy .

    I’ve done the following with no success:
    1. Unchecked / unticked the show toolbar option under user profile
    2. Confirmed that only Administrator is selected on the WPUF Show Admin bar setting

    Separately, I’ve disabled WPUF to see if the Admin bar would go away for non-admin users – it did.

    The solution appears to require the use of another plugin, which I’ve shared above.

    Hello @bennieblvnco

    Thanks for the quick update ??

    Not sure why this is happening to you but it’s working here. I just checked it on my staging and the local test site. What I did:

    -> Unchecked the toolbar option for the specific(Contributor) user
    -> From the WPUF settings, I have selected the Administrator only to show the toolbar

    Then switched to the user(Contributor roled), the toolbar is not showing. Not sure why this is happening to you though! However, if you can contact our support center, I can have a look on your site personally if you wish to check it by me:)

    Thanks

    @thebengalboy I submitted a support ticket on Feb 1st. See #128259

    Hello @bennieblvnco, @damf77 & @eviebpat,

    Just remove the following code from wpuf.php file. It will fix the admin bar issue.

    if ( get_user_meta( $current_user->ID, 'show_admin_bar_front', true ) == "true" ) {
        return true;
    }
    

    Also, we will include this fix in the next release.

    Thanks

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Hide admin bar’ is closed to new replies.