restrict content for memberships

Hi
I have some menu items which i would like to show to everyone. This is fine but once a user logs in with membership i would like the menu items to change, this means restricting the page to people who do not have membership.

How can this be done? I did accomplish this within the old membership plugin version because 'visitors' access was specifically stated, whereas with the new version, visitors simply get access to everything that is not protected by membership.

For example, one thing i am trying to do is, in my menu I have 'login'. Once the member is logged in i do not want to show the login item anymore - because they are logged in. Previously i had set it so the login item would not show to membership but now that it has changed I have to state items i would like to show.

Hopefully this makes sense. Any help would be appreciated.

Thanks

J

  • Sajid
    • DEV MAN’s Sidekick

    Hi @Justin

    Hope you are doing good today :slight_smile:

    This is possible with membership 2 pro too. To do this you have to enable "Advanced menu protection" add-on from Membership 2 > Add-ons. Once its enabled you will see other options when you will click on details link. From there you can chose between three different types of menu protection as seen in screenshot.

    Hope that helps :slight_smile: or feel free to post a reply if you need further assistance.

    Kind Regards
    Sajid J

  • Justin
    • Site Builder, Child of Zeus

    Hi Sajid

    Thanks for your reply.

    I have had a look at 'replace individual menus' but it does not seem to be taking effect for me.

    I have created a 'visitors' menu and a menu for each membership product. I have set up the access as shown in the attachment.

    This set up should replace the menu if the user is a certain type of membership. I think the problem is around the 'default' menu item. My theme asks for me to specify a default 'main menu' and it seems that this is over-riding the menu changing. What do you think?

    FYI i have provided support access today in another ticket if you would like to take a look.

    Many thanks again.

    J

  • Nastia
    • Support Rock Star

    Hello @Justin, I hope you are well today!

    Right now the Primary menu is "Visitor" which is set up to be shown everywhere. Based on your settings in "Replace Menus" section you have selected to replace Bronze, Gold, Platinium and Silver menus with Visitor menu.

    I can't find in your Dashboard where these menus appearing, to check.

    Perhaps you wish to replace Visitor menu with the menus you have created for Membership's members?

    Please advise,

    Kind regards,
    Nastia

  • Michael Bourne
    • Site Builder, Child of Zeus

    Justin, the left column should all say visitor. Then create a new rule for each membership level.

    Menu | Replace | Access
    visitor | gold | gold memberships
    visitor | silver | silver memberships

    Etc... It took me a bit to figure this out as well.

  • Justin
    • Site Builder, Child of Zeus

    Hi Nastia and Michael

    Thanks for your feedback.

    Yes, i want to replace the menu depending on what membership they are logged in under.

    I see what Michael is saying although does this mean i need to duplicate the visitors menu for every type of membership? Can I even create another menu under the same name of 'visitors'? Or am i missing something?

    I have set it not so that there there no replacement menu for bronze, silver, gold or platinum and only the respective memberships have access to view them. I only have one 'visitors' menu which is assigned as my default main menu in my theme. How can i replace this menu as Michael describes:

    visitor menu replaced with gold menu for gold memberships
    visitor menu replace with silver menu for silver memberships and so on.

    Thanks again.

    Justin

  • Nastia
    • Support Rock Star

    Hello @Justin, I trust you are well today!

    In this case, the simplest way to achieve that would be to create a single menu and add that to your theme location.

    In Membership 2 -> Add-ons -> Advanced menu protection, select "Protect Single Menu Items" option.

    Then, in Protection rules -> Menu Itemsyou can modify acces for each level to show/hide individual menu items.

    I hope this helps! Let us know if you require further assistance!

    Cheers,
    Nastia

  • Justin
    • Site Builder, Child of Zeus

    Hi Nastia

    Thanks for your reply.

    I did try this option to begin with although one problem i run in to is when i only want to show a menu item to a visitor, and not any of the memberships,

    for example i have a 'Join Now' menu item - i would like this menu item to disappear when the user has registered. So in this scenario i would like 'who has access' to be 'NOT Gold' and 'NOT Platinum' etc. Is there a way to select this?

    As I mentioned previously, the membership 2 version is different in that the previous membership plugin the administrator configures the 'visitor' permissions whereas this version the 'visitor' permissions are whatever has not been restricted.

    Thanks again

    Justin

  • Nastia
    • Support Rock Star

    Hello @Justin, I hope you are well!

    i only want to show a menu item to a visitor, and not any of the memberships,

    You can create Guest Membership, only for visitors, which will apply to all logged out users. And set up your selected menu item to be only visible to Guest Membership, as shown in the attached screenshot.

    I hope this helps!

    Cheers,
    Nastia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.