Menus for Logged in and Logged Out Users

Hi,

I would like a menu for logged in users and menu for logged out users. All logged in users are members of the default membership which makes things easier.

On logging in, the logged in users is then taken to a Home Logged In members Page.

Is this possible to do please and if so how ?

Many thanks for the help

Stephen

  • Adam Czajczyk
    • Support Gorilla

    Hello Stephen,

    I hope you're well today and thank you for your question!

    With Membership 2 Pro and a "default membership" being used, this should be relatively easy to achieve. I'd go this way:

    - on "Membership 2 -> Add ons" page enable the "Advanced menu protection" add-on
    - on the same page enter the "Details" page for this add on and make sure that the "Replace individual Menus" option is selected.

    - go to "Appearance -> Menus" page
    - create and select two menus: one will be used for logged in members and one for guests
    - set the one that should be used for "logged in members" as default menu for menu location (e.g. as primary menu)

    - go to "Membership 2 -> Protection Rules -> Replace Menus" page
    - find the main (the one for logged in members) menu on the list and click on "Everyone" label
    - select your default membership and select a replacement menu.

    As a result the "default" menu will be shown to members of the default membership and for others it will be replaced with "Replace with this Menu" menu. Of course you can assign more memberships there if necessary.

    I hope that helps!

    Best regards,
    Adam

  • Stephen
    • Site Builder, Child of Zeus

    HI Adam,

    Thanks for this but I am having problems with step 3 Membership 2 -> Protection Rules -> Replace Menus" page

    When There are 2 headings on the Protect Rules Page at the top left: All, or Default Membership.

    Which one do I select and if I have to select both - what are the settings for each please ?

    I have tried various options but cannot get back to the main menu when I log out

    Thank you for the help !

    Stephen

  • Milan
    • WordPress Wizard

    Hello Stephen,

    Hope you are well today and won't mind me chiming here.

    Could you please tell me what option you have selected for Advanced Menu Protection Add on ? I am not seeing any such options like default and all there, so to be on same side, would you please attach screenshot of your setting page on Protection Rules tab ?

    Looking forward to hearing back. :slight_smile:
    Cheers,
    Milan

  • Stephen
    • Site Builder, Child of Zeus

    Many thanks Milan for coming back.

    My membership is Default membership. I have 2 menus Logged In (default) and Main Menu.

    I then go to the Protect Rules, Replace Menus and as per the screen shot attached, there are 2 headings top left of the page called All and Default Membership.

    What are the settings please for both these menu regarding Replaces With This Menu and Who Has Access.

    Many thanks for the help ! I have tried various settings but cannot get it right.

    Best regards,

    Stephen

  • Predrag Dubajic
    • Support

    Hi Stephen,

    If I understand your request correctly what you need to do is in "Replace with this menu" column next to Logged in select Main Menu, and in "Who has access" select your membership for logged in users.

    So now logged in users will see Logged In menu while others will see Main Menu.

    Is that what you wanted to do?

    Best regards,
    Predrag

  • Stephen
    • Site Builder, Child of Zeus

    No - I am sorry - it is not working - I am probably doing it wrong. Can I send you the login details for you to have a look and to get the configuration right - how best to send you the log in details please ?

    Thanks for the help

    Stephen

  • Predrag Dubajic
    • Support

    Hi Stephen,

    I was able to access your site normally and saw the issue on your end, but there's strange thing happening.

    Before Milan answered on your thread two days ago he asked me to test this on my installation and the setup I explained above worked seamlessly, and now when you granted access and I saw it's not working on your end I went back to my installation to perform couple of more test and noticed that it stopped working there as well.
    I have now asked other staff members to jump in on testing this and two of them that tested couldn't replicate it but I'm waiting for their update after some time has passed to see if it will stop working as it did on my installation.
    In the meantime I also created bug report for the developers so they can check it out in backend as well.

    Hopefully they will be able to figure out soon why would this strange behaviour happen.

    Best regards,
    Predrag

  • Stephen
    • Site Builder, Child of Zeus

    Hi Predrag,

    Many thanks for the update and for following this up. I am glad it wasn’t just me !

    I look forward to hearing back from you in due course. The Membership Plugin is a great plugin - extremely useful. It is to be expected to have the odd glitch.

    Best regards,

    Stephen

  • Stephen
    • Site Builder, Child of Zeus

    Hi Adam,

    I am sorry - it is still not working. The menu for the logged out users or Main Menu is showing when you are logged in and out. The logged in menu is not showing when you are logged in. Please can you keep trying to get this to work.

    Many thanks for the help.

    Stephen

  • Predrag Dubajic
    • Support

    Hi Stephen,

    Sorry about that, it was actually showing correct for logged in users, except for the admin, so what I did now is created visitor membership (logged out users) and changed your primary menu as well as protection rules and I believe that this should do it now, I tested it with admin, subscriber and visitor and it worked for me.

    Please have another look and tell me if it works for you as well.

    Best regards,
    Predrag

  • Stephen
    • Site Builder, Child of Zeus

    Hi Predag,

    Brilliant and well done - works a treat. However - please could you just clarify what you did:

    - the logged in menu is the default set in menu locations

    - create - default membership and guest membership (default is for logged in users and guest is for admin)

    - please could you clarify the remainder ?

    Many thanks for the help in getting it to work - what was the problem please ?

    Best regards,

    Stephen

  • Predrag Dubajic
    • Support

    Hi Stephen,

    There are few things to watch out for when using menu replacement, first is what is selected as your primary menu, what memberships are available and who should see what.

    So here's what I did on your site.
    In Appearance > Menus I selected Logged In menu as primary (Header Menu) menu.
    Then I created one Spectator "membership", this would be rules for site visitors that are not registered.
    And now I protected Logged In menu and selected Main Menu to replace it for Spectators (visitors).

    That's it. :slight_smile:

    As for the issue showing on my test site, I guess me and Milan bumped heads somewhere down the testing road and misconfigured it there as well as I was able to get it working now :slight_smile:

    Best regards,
    Predrag

  • Stephen
    • Site Builder, Child of Zeus

    Sorry - I am back again - my fault - but as admin I need to see the logged and logged out or main menu so i can edit pages etc. I should have thought of that - my fault.

    I am not sure how to make admin see both menus. You can still get into the site.

    Many thanks for the help !

    Best regards,

    Stephen

  • Adam Czajczyk
    • Support Gorilla

    Hello Stephen!

    There's a one "menu slot" to be shown in the theme so there's no option to show two menus there at once even without Membership 2 protection. The "replace" feature is also designed to "replace" the menu instead of just "hiding/showing" it.

    In this case the solution would be entirely different. Instead of using "replace menu" option you would want to follow these steps:

    - remove "replacement rules" so the menu would go back to initial/default state
    - add all menu items to a single menu so the primary menu would include all possible items: those that should be visible to admin, to logged in users and to visitors
    - on "Membership 2 -> Add-ons" page in "Advanced Menu Protection" ("Details" link) switch option to "Protect single Menu Items (Default)"

    - on "Membership 2 -> Protection Rules -> Menu Items" select your primary menu from the menus list above the menu items list

    - for each menu item assign one or more memberships.

    This works the same way as regular Post/Page protection and would let you achieve pretty much the same effect as "menu replacement" but you could also assign more memberships to each menu item and an admin would always see all the items (the same way admin always sees post/page even if it's protected).

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.