Simple Membership Plugin › Forums › Simple Membership Plugin › Members NO access to WP Dashboard, but I need WP Editors to have access
- This topic has 11 replies, 6 voices, and was last updated 7 years, 5 months ago by
Steve.
-
AuthorPosts
-
April 25, 2017 at 8:21 am #10811
AustinWeb
ParticipantI need for members NOT to have access to the WP Dashboard, but I need WP Editors to have access to the WP Dashboard. How do I make this work?
April 25, 2017 at 9:38 pm #10812mbrsolution
ModeratorHi, did you check the following settings WP Membership -> Settings -> Advanced Settings -> Admin Dashboard Access Permission?
May 14, 2018 at 4:38 pm #14420artesea
ParticipantGoing to follow this up as I appear to have this issue. I’m the admin, and have several editors. They need access to /wp-admin whilst any of our subscribers should be blocked from the dashboard.
I turned on WP Membership -> Settings -> General Settings -> Hide Adminbar, Show Adminbar to Admin and Disable Access to WP Dashboard
Then in WP Membership -> Settings -> Advanced Settings -> Admin Dashboard Access Permission to Author.My editor tried to login but gets “The admin of this site does not allow users to access the wp dashboard.”
If I untick “Disable Access to WP Dashboard” they can reach the dashboard and edit pages fine, however then my subscribers can also visit the dashboard too.
I assumed that “Admin” in the General Settings page meant the value set in the “Admin Dashboard Access Permission” field.
May 14, 2018 at 10:15 pm #14421mbrsolution
ModeratorHi,
Iām the admin, and have several editors. They need access to /wp-admin whilst any of our subscribers should be blocked from the dashboard.
Currently there is no feature for what you are asking above.
Then in WP Membership -> Settings -> Advanced Settings -> Admin Dashboard Access Permission to Author.
The above settings will allow an Author to have access to SWPM admin dashboard. This has nothing to do with WP Admin access.
The following is the explanation for the above feature.
SWPM admin dashboard is accessible to admin users only (just like any other plugin). You can allow users with other WP user role to access the SWPM admin dashboard by selecting a value here.
I have submitted a message to the developers to investigate further your request.
Thank you
May 15, 2018 at 4:27 am #14425admin
KeymasterThe admin bar is really a core WordPress feature. We just have a simple feature to turn it off but that little feature is just not going to be enough when you need a customized solution. In your case you do need a customized solution as our standard feature is to block non-admin users.
Its best if you disable that checkbox in our plugin then apply your own customization to deal with the “hiding of admin bar” and “disabling of wp admin dashboard access” according to your requirement for your site.
May 15, 2018 at 8:50 am #14428artesea
ParticipantLooking at the code lines 177 and 204 of class.simple-wp-membership.php could easily be set to another variable from the admin pages.
However for those who wan’t more than just admins having backend access you can add these lines to your themes functions.php file (in this code subscribers are blocked from having the admin bar and access to wp-admin pages)
/*hide admin bar and wp-admin from subscribers */ if(current_user_can('subscriber')) { add_filter('show_admin_bar', '__return_false'); } function MY_THEME_NAME_admin_init() { if(current_user_can('subscriber') && (!wp_doing_ajax())) { wp_die('You do not have permission to view this page'); } } add_action('admin_init', 'MY_THEME_NAME_admin_init');Whilst making sure all the three tick boxes within the Simple Membership settings aren’t ticked.
December 1, 2018 at 5:45 pm #16898Marv
Participantartesea,
Do I have to replace “MY_THEME_NAME” with my them name? I’m using Sydney child.
Thank you.December 2, 2018 at 1:13 am #16901admin
Keymaster@Marv, I believe you can use any “name” there for the function name. I think the other user used his theme name to make the function name unique.
December 4, 2018 at 10:12 pm #16918Marv
ParticipantI can’t get it to work. The user is classified as Entry.
January 1, 2019 at 10:53 pm #17069Steve
ParticipantPlease, someone help!
I don’t know php and I guess I did something stupid because I selected the box to only allow admin to access the WP Dashboard. but then I logged out of the dashboard and now when I go to website.com/wp-admin it will not let me in I get this:
The admin of this site does not allow users to access the wp dashboard.
Go back to the home page by clicking here.
How do I get back in as an admin?
I’ve been working on setting this up for three days creating all the content and pages and setting all the variables . . . I would hate to have to uninstall and start over!
Please, someone, tell me there is a file somewhere I can make a change in my cPanel.
Thanks
NEVER MIND! I just realized I was still logged in as a member, so when I logged out as a regular member I was able to log in as admin. So I was right. I did do something stupid! š
January 1, 2019 at 11:20 pm #17071mbrsolution
ModeratorHi Steve, do you still need some help or have you manage to solve your issue?
Thank you
January 1, 2019 at 11:22 pm #17073Steve
ParticipantNo, I figured it out. Thanks for getting back to me so quickly!
-
AuthorPosts
- You must be logged in to reply to this topic.