How to Show or Hide WordPress Menu Items Using Infusionsoft Tags, Membership Levels or Whether a User Is Logged in Or Not

This Article Applies to
OTHER Articles Available

Make Sure You’re Updated

The feature described below only works if you’re running Memberium 2.161 or greater. You’ll also need to be on WordPress 5.4.1 or greater. Contact support with any questions.

In this post, we’ll show you how to show or hide WordPress menu items based on a member’s Infusionsoft tags and membership levels.

With Memberium’s most recent updates, controlling who can see certain menu items has never been easier. You don’t need to know PHP or be a computer expert in order to follow this guide and implement this on your site.

How can I use this on my membership site?

Controlling menu items conditionally can be used a lot of different ways to make your Membership site more dynamic for your members based on their past interactions and current membership level. Here are a few examples of how you could use conditional menus with your WordPress site:

  • Showing sales page links to visitors who haven’t bought a certain course or product yet.
  • Hiding sales page links/offers from customers who have purchased them already.
  • Dripping content through your main navigation menu.
  • Unlocking new content sequentially upon completion with LearnDash.
  • Showing or hiding certain links, opt in’s or targeted offers based on a user’s existing Infusionsoft tags.
  • Displaying a log out / log in link if a user is logged in or not.
You can also display widgets conditionally using the same conditional tags covered in this post.

Step-by-Step Instructions

In the past, we recommended you install a third-party plugin to accomplish this, but in an effort to make things easier for our customers, we’ve now included this functionality right into Memberium.

First, just make sure your Memberium plugin is updated to at least version 2.161.

Next, you’ll navigate to Appearance > Menus and click on the menu item you’re wanting to set conditions for.

Here’s an overview of all the conditions you can use to control the visibility of menu items on your site.

How to display a menu item to members who have any of the following Infusionsoft tags:

To display a menu item to a member who has a specific Infusionsoft tag, first set the User Status to Logged In Users Only. This will open up more options including the Require Tag ID(s) box. From there, simply type in the name or ID of the tag you want to require members have.

If you select multiple tags, the member will only be required to have one in order to see the menu item.

You can also require that a member NOT have a certain tag. Each tag will have a “Does Not Have” version beneath it. Select that and anyone who has the tag in question won’t be able to see the menu item.

How to display a menu item to members who have two Infusionsoft tags:

In certain situations, you’ll want to display a menu item to members who have two tags in Infusionsoft – requiring they have both in order to see the menu item.

First set the User Status to Logged In Users Only. This will open up more options including the Require Tag ID(s) box and the AND Require Tag ID(s) box. In the first box, type in the first tag you want to require. In the second box, type in the second tag. With one tag in each box, the member will need to have BOTH tags in order to see the menu item.


If you were to put multiple tags in each box, the member would only need one tag from each box in order to see the menu item.

How to display a menu item to members with a specific membership level:

You can show menu items only to members with specific membership levels by clicking in the membership dropdown and selecting the levels you want to see the menu item.

An example of how you could use this type of logic could be used to display a sales page link to members who are enrolled in our “Free Course”.

Keep in mind – if a certain page or post is protected by a membership level, and the prohibited action is set to hide or redirect, Memberium will automatically hide a menu item from a member who doesn’t have the Infusionsoft tag to access that membership level. The menu item will also be hidden from logged out visitors.

Display a menu item only to logged-in users:

To only display a menu item to members who are logged in, you’d set the User Status to “Logged In Users Only” and you’d leave all the settings blank.

This menu item will be hidden completely from any logged out user and will only display to visitors who are logged in.

As an example, you could use this to show a logout link only to members who are logged into the site.

Another use case could be to hide My Account pages from members who are logged out. This will keep your menu clean for people who aren’t logged in.

Display a menu item only to logged out users:

To only display a menu item to members who are logged out, you’d set the User Status to “Logged Out Users Only”.

Only users who are logged out would be able to see this menu item.

A real-world example could be a link to your login page or a link to a sales page.

Combining Multiple Functions to Create Advanced Conditions

You can combine multiple functions above to create advanced conditions. You can also use the PHP Boolean Expression box at the bottom to define custom yes/no output expressions that will determine the visibility.

As an example let’s say we want to display a menu item only for “Gold” Members who also have the Infusionsoft tag id of “130”:

memb_hasAnyMembership( "Gold" ) && memb_hasAnyTags( "130" )

If we wanted to reverse the logic of the previous example, you’d just prefix each boolean with an exclamation mark “!” like so:

!memb_hasAnyMembership( "Gold" ) && !memb_hasAnyTags( "130" )

As you can see, PHP Boolean expressions can be combined by adding two ampersands && in between them.

You can find all the conditional expressions on this page under the “Conditional Functions” heading.

Need Help?

There are tons of other possibilities of how you could use this feature to create a more personal and unique experience for your members. If you have any questions about how to use conditional statements with Memberium don’t hesitate to contact support if you need any help.

Related Posts:

  • Was this Helpful?
  • YesNo
9 ways to add more value to your membership site

Table of Contents

This Article Applies to

Keep Reading


This function takes a single string argument, which is the name of the membership level that you want to test access for. By membership level name, that would be something like “gold” or “silver”, etc. This is a case insensitive comparison.

Read More »

Infusionsoft Username Field

This dropdown selects which fields in your Infusionsoft contact record is used to match the login name to. Currently we only support email fields, and we encourage you to use “Email” as your username. This provides the most reliability and maximum compatibility.

Read More »

Private Comments

Memberium’s Private Comments feature gives you the ability to easily make comments for any page or post private, so that only the administrators, the author of the page/post, and the author of the comment can see the comment on the page.

Read More »

Want to get some fresh ideas on how you can improve your membership site or course?

Download our free ebook!

Book a Call

Welcome to Memberium!

We are very excited for you to be part of our family. 

We would love to answer any questions that you have!

Please choose the best time for you to get in a call with us. 

For Technical Support, you can contact us at or Email us at