Hide Menu Items from Logged In Members

MemberMouse has a simple feature to hide protected WordPress pages from menus. However, sometimes you might have a page that you don't want to protect because it's meant to be viewed by non-members, such as a “Become a Member” page. And once someone becomes a member, you'd like to hide the menu link from them. This can be done in one of two straightforward ways using the MM_Member_Decision SmartTag.

Hide the item and leave a blank space in the menu

It is possible to hide the navigation link from members (although the hidden space will still be clickable). If you place this SmartTag™ in the navigation label for the menu, it will do that:

[MM_Member_Decision isMember="false"]Become a Member[/MM_Member_Decision]

Below is an example of where to find the “Navigation Label” for the menu:

Replace the item with alternate messaging

You can also choose to show a different message to members instead of just hiding the item from them. Here's an example of code that shows the “Become a Member” link to non-members and an “Upgrade” link to members:

[MM_Member_Decision isMember="false"]Become a Member[/MM_Member_Decision
[MM_Member_Decision isFree="true"]Upgrade to Premium[/MM_Member_Decision]

You can then employ MM_Member_Decision SmartTags on the page that the menu item links to in order to display different messaging depending on whether the person is a member or non-member.

Was this article helpful?

Related Articles

Can’t find the answer you’re looking for?

Reach out to our Customer Success Team
Contact us!