menu item to disapear please

Hi, I have the menu set up to reveal the main menu only to logged in users.

The registration page is in the menu and is not protected. So it’s the only menu item that is visible to guests, not logged in users.

I would like that menu item, “registration” to then be gone once someone is logged in.

How exactly do I accomplish this please? Thank you

  • Katya Tsihotska
    • Support & QA

    Hi OMNISAPIEN

    Hope you're having a wonderful day!

    I would recommend you to try to use the Advanced menu protection add-on. It allows you to replace menu with depends on the membership:

    1. First of all, you will have to create 2 menus: one for logged in users and another for guests. Menu for guest should be enabled by default.

    2. Create the Guest Membership (for non-logged in users).

    3. Activate the Advanced menu protection add-on. You can do this on the Membership 2 -> Add-ons page.

    4. Then in the add-on settings choose that you'd like to replace individual menus.

    5. After this, go to the Membership 2 -> Protection Rules -> Replace Menus. Find your menu for guests, and set that only users from the Guest membership have access to it. Also, set replacement with the menu for logged in users.

    Also, as a workaround you can use the following plugin:

    https://wordpress.org/plugins/user-menus/

    If you have any additional questions please let us know, we always are happy to help.

    Kind regards,

    Katya

  • OMNISAPIEN
    • Site Builder, Child of Zeus

    AH! I see. Creating the Guest membership. That was the part that I didn’t intuit as a necessary component of the set up.

    Thank you for taking the time to define the process in a step by step manner.

    :slight_smile:

    WPMUDEV rocks.

  • Katya Tsihotska
    • Support & QA

    Hi OMNISAPIEN

    Hope you’re well!

    I’ve just tested this on my install and found that it works in another direction, so it shows for Guests the menu that is set in the “Replace with this Menu” and for everyone else it shows the default menu. I’m not sure if it’s a bug, so I will create a report for our developers to get their valuable feedback on this. I will let you know about any updates on this.

    In the meantime, to get it to work you have to do the following:

    1. Create 2 menus: Menu1 for logged in users and Menu2 for guests.

    2. Go to the Appearance -> Menus and set for Menu1 Display Location -> Primary menu (or another location depends on your needs)

    3. Activate the Advanced menu protection add-on and in the add-on settings choose that you’d like to replace individual menus.

    4. Go to the Membership 2 -> Protection Rules -> Replace Menus, find the Menu1 and set Who Has Access -> Guest Membership, and Replace with this Menu -> Menu2 (menu for Guests).

    On my site, this configuration works. If this doesn’t work for you, could you please grant us temporary support access to your website so we can have a better look at your setup and settings? You can grant us access via WPMUDEV Dashboard plugin, there’s no need to share credentials. Here’s our detailed documentation page about it:

    https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-5

    And also provide names of the menu for guest and logged in users.

    Kind regards,

    Katya

  • OMNISAPIEN
    • Site Builder, Child of Zeus

    Thanks Katya,

    Re: Membership 2 pro, is there a place where I can select the URL or PAGE that the newly signed in member is supposed to go? Currently it defaults to the account page. This is the memberhhip account page. Not he WOO COMMERCE account page.

    This leads me to another question.

    Can not the membership 2 pro user info generate a basic WP user and or a WooCommerce user?

    When loggin out as a woocommerce user, the Membership 2 Pro user is still logged in. So it’s impossible to log out unless you log out of both user Account pages.

  • Katya Tsihotska
    • Support & QA

    Hi OMNISAPIEN

    Re: Membership 2 pro, is there a place where I can select the URL or PAGE that the newly signed in member is supposed to go? Currently it defaults to the account page. This is the memberhhip account page. Not he WOO COMMERCE account page.

    By default, after the successful registration, the user is redirected to the Thank You Page. You can change this page and set the WooCommerce account page as your Thank You Page at the Membership 2 -> Settings -> General

    This leads me to another question.

    Can not the membership 2 pro user info generate a basic WP user and or a WooCommerce user?

    When loggin out as a woocommerce user, the Membership 2 Pro user is still logged in. So it's impossible to log out unless you log out of both user Account pages.

    Actually, Membership 2 works on the WordPress users basis, when someone registers on your site via Membership 2 Pro, it creates a usual WordPress account for this user. Also, log in and log out process works on the WordPress users base as well. As far as I know, WooCommerce does the same.

    I've tested this on my install with Membership 2 Pro and WooCommerce, and when I'm logging out through the WooCommerce account page, this logs me out from the entire site and from the Membership 2 Pro as well. The same happens when I'm logging out through the Membership 2 Pro account page.

    If this works in another way for you, would you mind enabling support access for us so I can take a closer look? Here's our detailed documentation page about it:

    https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-5

    Kind regards,

    Katya

  • Katya Tsihotska
    • Support & QA

    Hi OMNISAPIEN

    Hope you’re doing well today!

    There are 2 ways to set redirect after login/logout.

    1. Using the Redirect Control add-on (Membership 2 -> Add-ons page). When you’ll enable this add-on, you will see a new section Redirect in the Membership 2 -> Settings page. In this section, you can set custom redirect URL after login and after logout.

    2.the If you’re using shortcode [ms-membership-login], you can user parameters redirect_login and/or redirect_logout to set redirect after login/logout via this particular form. More about the shortcode and its parameters you can find at the Membership 2 -> Help -> Shortcodes page.

    Kind regards,

    Katya

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.