Skip to main content

Menu Item Visibility

Overview

When using iMember360 you can dynamically control the visibility of any menu item to personalize and segment your content.

WordPress menu visibility can be controlled by iMember360 using Conditionals based upon:

Contact Tag Status – Conditions based on Keap contact tags.
  • Contact has any or all of the tags selected
  • Contact does not have any or all of the tags selected
Contact Field Comparison – Conditions based on Keap contact field values.
  • Contact has a contact field that compares with a value
  • Contact has a contact field that compares with another of their contact fields
User Login Status – Conditions based on WordPress login state.
  • User is logged in
  • User is not logged in
  • User has failed payment status
  • It is the user's first login
User Role Status – Conditions based on WordPress user roles.
  • User has any or all of the roles selected
  • User does not have any or all of the roles selected
PHP Statement – Conditions based on custom PHP code.
  • Any WordPress conditional statement
  • Any WooCommerce conditional statement
Predefined Conditional – Reference another conditional.
  • Predefined Conditional evaluates to true
  • Predefined Conditional evaluates to false
GamiPress User Status – Conditions based on GamiPress achievements and ranks.
  • User has any or all of the achievements selected
  • User does not have any or all of the achievements selected
  • User has any or all of the ranks selected
  • User does not have any or all of the ranks selected
  • User has a points type total that compares with a value
LearnDash User Status – Conditions based on LearnDash course progress.
  • User is enrolled in any or all of the courses selected
  • User is not enrolled in any or all of the courses selected
  • User has not started any or all of the courses selected
  • User has in progress any or all of the courses selected
  • User has completed any or all of the courses selected
  • User has not completed any or all of the lessons selected
  • User has completed any or all of the lessons selected
  • User has not completed any or all of the topics selected
  • User has completed any or all of the topics selected
WooCommerce User Status – Conditions based on WooCommerce purchases.
  • User has purchased any or all of the products selected
  • User has not purchased any or all of the products selected
  • User has pending status for any or all of the subscriptions selected
  • User has active status for any or all of the subscriptions selected
  • User has on hold status for any or all of the subscriptions selected
  • User has pending cancellation status for any or all of the subscriptions selected
  • User has cancelled status for any or all of the subscriptions selected
  • User has expired status for any or all of the subscriptions selected

…and any multiples and combinations of the above.

Configuration & Settings

Menu visibility can be controlled using two distinct methods with iMember360.

The most advanced way is using Conditional mode. However an Individual mode is also supported.

info

We would always recommend using Conditional mode as it provides the greatest flexibility regarding the conditions available to control the display of the menu item for personalization and segmentation.

Adding/defining a Conditional is detailed at Adding Conditionals.

Individual mode is primarily available to provide backward compatibility for menu visibility controls defined prior to Conditionals being introduced.

Conditional Mode

Steps to select the menu item and control the visibility based upon conditionals

Steps to select the menu item and control the visibility based upon conditionals

  1. In the WordPress administrator main navigation click Appearance, Menus.
  2. Select the required menu item.
  3. Locate the iMember360 panel.
  4. Select the Conditional radio button to use conditionals for controlling the visibility of the menu item.
  5. Using the Display if the conditional evaluates radio buttons select whether the conditional needs to evaluate as True or False to display the block.
  6. From the Conditional drop down select the required conditional to be evaluated. Active conditionals are shown with the suffix (publish).
  7. Once the settings have been completed ensure Save Menu is clicked to save the configuration.

Individual Mode

Steps to select the menu item and control the visibility based upon individual settings

Steps to select the menu item and control the visibility based upon individual settings

  1. In the WordPress administrator main navigation click Appearance, Menus.

  2. Select the required menu item.

  3. Locate the iMember360 panel.

  4. Select the Individual radio button to use individual conditions for controlling the visibility of the menu item.

  5. Set the menu item Display if/when setting to Always, Is Logged In, Not Logged In or Never.

    The default Display if/when setting is to Always display the selected menu item.

    warning

    The Display if/when setting works in conjunction with the other iMember360 visibility conditions of Display if the visitor has tags, Do not display if the visitor has tags and the PHP condition to determine the menu item visibility.

    They work as AND conditions. If any conditions evaluate as FALSE the menu item will not be visible.

    If Never is selected as the Display if/when setting irrespective of other conditions the block will never be shown. The purpose of this Never setting is to keep the menu item settings in place should you wish to effectively disable the menu item.

  6. Set visibility conditions for the WordPress menu item based upon the Keap contact tag/tags the visitor has. In the Display if the visitor has tags: selection area select the Keap tag(s) the user should have for this condition to evaluate as TRUE. The user can have ANY of the tags specified for the condition to evaluate as TRUE.

    • Click in the selection area and start typing part of the tag name to refine the list. Then click on the required tag.
    • Multiple tags can be selected.
    • Individual tags can be removed from the selection by clicking on the x shown next to the individual tag name.
    • For not logged in users this condition will always evaluate as FALSE if tags are specified.
  7. Set visibility conditions for the WordPress menu item based upon the Keap contact tag/tags the visitor does not have. In the Do not display if the visitor has tags: selection area select the Keap CRM tag(s) the user should not have for this condition to evaluate as TRUE. The user must have NONE of the tags specified for the condition to evaluate as TRUE. If the contact has any of the selected tags the menu item will not be displayed.

    • Click in the selection area and start typing part of the tag name to refine the list. Then click on the required tag.
    • Multiple tags can be selected.
    • Individual tags can be removed from the selection by clicking on the x shown next to the individual tag name.
    • For not logged in users this condition will always evaluate as TRUE.
  8. Set visibility conditions for the WordPress menu item based upon a conditional PHP statement.

    In the Display if the following PHP condition is true: input area define the PHP conditional statement. Any valid PHP conditional function can be used. iMember360 has conditional functions that can be used, e.g. i4w_has_tags()

    Statement evaluates as TRUE if the user HAS tag 123.

    PHP
    i4w_has_tags( '123' )
  9. Once the settings have been completed ensure Save Menu is clicked to save the configuration.