[Resolved] Access hide WP back-end and toolbar for members

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will answer your ticket in about 8.05 hours from now. Thank you for your understanding.

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to hide the admin bar from non-admins

Solution:

Have a look at this and it should allow you to do this. http://www.wpbeginner.com/wp-tutorials/how-to-disable-wordpress-admin-bar-for-all-users-except-administrators/

Tagged: 

This topic contains 7 replies, has 2 voices, and was last updated by  arnoldd 2 months ago. The support staff assigned to this topic is Shane.

Viewing 8 posts - 1 through 8 (of 8 total)
Author
Posts
#578344

I have a members site where members with a custom role can post messages and update their profile and so on from the front-end. Something like this: https://wp-types.com/documentation/user-guides/cred-training-course/part-9-listing-items-belong-logged-user/
I use everything from Toolset including Access.

But logged in users will still see the toolbar after logging in and can access the wp dashboard in the back-end. This does not seems correct for a membership site. I can not find anything in Access that completely disables the backend for members, and also the toolbar.

Mayby, the "read" function, but by a work around (url) it is still possible to come in the back-end.

Is this possible with Toolset?

#578375

Shane
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/Jamaica (GMT-05:00)

Hi Arnold,

Thank you for contacting our support forum.

Could you try going to the roles in access and changed the role permissions so that none of the checkboxes are ticket.

Please let me know if this helps.

Thanks,
Shane

#578467

That did the trick for accept the admin bar.

if i try:

add_filter('show_admin_bar', '__return_false');

or:

show_admin_bar(false);

the admin bar stops showing on my admin account. But not on the custom Access created user role.

#578544

Shane
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/Jamaica (GMT-05:00)

Hi Arnold,

You can follow the instructions below to hide the admin bar for all non-admins.
hidden link

Please let me know if this helps.
Thanks,
Shane

#578597

No,

The only thing that works is:

add_filter( 'show_admin_bar', '__return_false' );

But only at the admin accound and no other one, not even WP roles?

#578602

Very very strange. I have now used multiple code snippets.

No one works with any user role except admin. Also does the check box don't work in my profile? Only at admin role.

Are there more users who experienced this issue?

A WP 4.8.2 error?

#578627

Shane
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/Jamaica (GMT-05:00)

Hi Arnold,

Would you mind allowing me to have a look at this for you ?

The private fields will be enable for your next response.

Thanks,
Shane

#578673

I think i found the culprit: Maintenance plugin.

There is a checkbox in the menu of this plugin: "Show admin bar". It owerwrites al other functions.

Sorry for your time.

Viewing 8 posts - 1 through 8 (of 8 total)