Overview

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

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

  • Contact list status:
    • Contact is active in any or all of the lists selected
    • Contact is unconfirmed in any or all of the lists selected
    • Contact is unsubscribed in any or all of the lists selected
    • Contact is bounced in any or all of the lists selected
  • Contact tag status:
    • Contact has any or all of the tags selected
    • Contact does not have any or all of the tags selected
  • Contact field comparison:
    • 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:
    • User is logged in
    • User is not logged in
    • User has failed payment status
    • It is the user’s first login
  • User role status:
    • User has any or all of the roles selected
    • User does not have any or all of the roles selected
  • PHP statement:
    • Any WordPress conditional statement
    • Any WooCommerce conditional statement
  • Predefined conditional
  • GamiPress User status:
    • 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:
    • 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:
    • 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
  • …any multiples and combinations of the above.

Configuration & Settings

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

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

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 ActiveMember360 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 in the drop down with the suffix of (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 ActiveMember360 panel.
  4. Select the Individual radio button to use individual conditions for controlling the visibility of the menu item.
  1. Set the menu item Display if/when setting to Always, Is Logged In, Not Logged In and Never.

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

    The Display if/when setting works in conjunction with the other ActiveMember360 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.

  2. Set visibility conditions for the WordPress menu item based upon the ActiveCampaign contact tag/tags the visitor has.

    In the Display if the visitor has tags: selection area select the ActiveCampaign 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.

  1. Set visibility conditions for the WordPress menu item based upon the ActiveCampaign contact tag/tags the visitor does not have.

    In the Do not display if the visitor has tags: selection area select the ActiveCampaign 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.

  1. 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.

    ActiveMember360 has conditional functions that can be used:

    mbr_has_tags()

    Here are some examples:

    a. Statement evaluates as TRUE if the user HAS tag 123.
    mbr_has_tags( '123' ) 
    b. Statement evaluates as TRUE if the user HAS tag 123 OR 234.
    mbr_has_tags( '123,234' ) 
    c. Statement evaluates as TRUE if the user HAS tag 123 OR 234.
    mbr_has_tags( array(123,234) )
    d. Statement evaluates as TRUE if the user HAS tag 123 AND 234.
    mbr_has_tags( '123,234', 'all' ) 
    e. Statement evaluates as TRUE if the user HAS tag 123 AND 234.
    mbr_has_tags( array(123,234), 'all' ) 

    Any function preceded with an exclamation mark ! specifies the negative use case of the function.

    f. Statement evaluates as TRUE if the user DOES NOT HAVE tag 123.
    !mbr_has_tags( '123' ) 

    It is also possible to combine conditions with && (representing AND) and || (representing OR).

    g. Statement evaluates as TRUE if the user HAS tag 123 AND DOES NOT HAVE tag 234.
    mbr_has_tags( '123' ) && !mbr_has_tags( '234' ) 
    h. Statement evaluates as TRUE if the user HAS tag 123 OR DOES NOT HAVE tag 234.
    mbr_has_tags( '123' ) || !mbr_has_tags( '234' )

    You can also use any conditional tags including WordPress and WooCommerce conditional tags.

    A list of WordPress Conditional Tags can be found here:

    WordPress Conditional Tags

    A list of WooCommerce Conditional Tags can be found here:

    WooCommerce Conditional Tags

    i. Statement evaluates as TRUE if this is the home page.
    is_home() 
  2. Once the settings have been completed ensure Save Menu is clicked to save the configuration.