• Resolved lucile0510

    (@lucile0510)


    Hello,

    My site is private and accessible only to members who have login credentials.
    I created different user roles for each of the members.
    I would like each role to only have access to certain pages.
    And that depending on the role some pages are not displayed in the menu.
    When I created my pages, at the bottom, I checked the user role who must have access to the content of this page.
    However, I did the test and once the user is logged in, he has access to all the pages … even those whose role had not been checked to authorize his access.

    Before I used the WP JV Reading Groups plugin which worked to limit page access based on user roles but I can no longer use this plugin because it is not compatible with the latest version of WordPress.

    What setting should be applied on the Members plugin so that each role has access to pages completely private to their user role?

    Thank you !

    • This topic was modified 4 years, 1 month ago by lucile0510.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Caseproof

    (@caseproof)

    Hi @lucile0510

    Content Permissions settings that you can see at the bottom of each edit page, allows you to protect the main content of the page, so you can still open that page as not authorized users but you’ll see “Unauthorized error message” instead of the content of this page. Could you confirm that this happens on your site?

    If you would like to display menu items based on user role, you can try this plugin: https://www.ads-software.com/plugins/if-menu/

    Thanks

    hayaalahmad

    (@hayaalahmad)

    @lucile0510
    @caseproof

    I have just encountered this Plugin and I have the same question.
    I am building a school’s portal.
    In this portal I have many users (students, teachers, admins, parents) each of them has their own features and capabilities. For example, some pages may be available to students and not parents.
    I don’t want for users to see “Unauthorized error message”. I want them to see what they CAN access and hide the pages they can’t.
    So do I do this by only using 2 plugins? “If-Menu” and “Members-Membership & User Role Editor Plugin” ?

    Plugin Author Caseproof

    (@caseproof)

    Hi @hayaalahmad

    If you want to set up Unauthorized Error message you can do this either globally in the Members → Settings → General section or per page in Content Permissions → Error Message tab. In this error message, you can add what users can access. Unfortunately, there’s no way to set up different error messages per role so you cannot set message for Students but not parents.

    If-Menu plugin can be used to display menu item based on role.

    Hopefully, that makes sense.

    hayaalahmad

    (@hayaalahmad)

    I have just installed the If-Menu Plugin. It works fine on the top-level menu items. However, It does not work on the sub-menu items. Could you please help me with that?

    Plugin Author Caseproof

    (@caseproof)

    Could you send the screenshot of the Visibility Rules that you set to your menu items? I just tested sub-menu items and Visibility Rules on my side worked well.

    hayaalahmad

    (@hayaalahmad)

    There is no option to insert images here LOL. Could you let me know how I can send it to you? Thanks!

    Plugin Author Caseproof

    (@caseproof)

    In order to add a screenshot, you’ll need to use one of the online services for storing images like https://prnt.sc/ and paste the link to your image here.

    hayaalahmad

    (@hayaalahmad)

    I set the Visibility rules for the sub-menu item (Induction Week) to be only for administrator.
    https://ibb.co/FYHyTkr

    However, when I log in from my subscriber account, I can still see it.
    https://ibb.co/GRD3xnk

    hayaalahmad

    (@hayaalahmad)

    https://ibb.co/DYXtJQC This is the link for the first image.

    hayaalahmad

    (@hayaalahmad)

    Ok, here’s an update of what came up. I was using a plugin for mega menu “WP Mega Menu” and the If-Menu was not working in the sub-menu items. However, when I disabled the Mega Menu. It Worked!. so is it incompatible with WP Mega Menu? Cause I really need the Mega Menu.

    Plugin Author Caseproof

    (@caseproof)

    @hayaalahmad Please contact the support of “If Menu” plugin: https://www.ads-software.com/support/plugin/if-menu/ as I’m not sure how to solve this conflict with Mega Menu.

    Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Display of certain pages according to the role of the user’ is closed to new replies.