Skip to main content

Visibility Conditions

This page provides detailed configuration instructions for display settings and visibility conditions available for blocks.

info

All visibility conditions work in conjunction with the Display Settings. They work as AND conditions, so all settings must evaluate as TRUE for the block to be displayed.


Display Settings

Specifying block display settings

  1. Within the Block Editor select the block to show the block settings in the settings sidebar. Navigate to the iMember360 tab and expand it if necessary.

  2. From the Control mode drop down ensure Individual is selected.

  3. From the Display if/when dropdown select the required display setting.

    The default iMember360 display setting is to Always display the selected block. The other display setting options are Is Logged In, Not Logged In and Never.

    info

    This iMember360 display setting works in conjunction with the other iMember360 display conditions of Tags, Custom Fields and PHP Statement to determine the block setting.

    They work as AND conditions. So all iMember360 settings for a single block must evaluate as TRUE for the display setting to have effect.

    If any conditions evaluate as FALSE the block will not be displayed.

    If Never is selected as the Display if/when setting irrespective of other conditions the block will never be shown.

  4. Once the settings have been completed ensure Publish or Update is clicked to save the configuration.


iMember360 Conditional

Select a conditional to control block display

  1. Within the Block Editor select the block to show the block settings in the settings sidebar. Navigate to the iMember360 tab and expand it if necessary.

  2. From the Control mode drop down ensure Conditional is selected.

  3. From the Display if the conditional evaluates drop down select whether the conditional needs to evaluate as True or False to display the block.

  4. From the Conditional drop down select the required conditional to be evaluated.

    info

    Active conditionals are shown in the drop down with the suffix of (publish).

  5. Once the settings have been completed ensure Publish or Update is clicked to save the configuration.


Contact Tags

Specifying visibility conditions for block based upon contact tags

  1. Locate the Tag section in Block Editor block settings, iMember360.

  2. From the Control mode drop down ensure Individual is selected.

  3. In the Tags (Any) drop down 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.

    All tags can be removed from the selection by clicking on the larger X shown to the left of the dropdown marker.

    info

    This Tags(Any) setting works in conjunction with the Tags(Not all) setting. They work as AND conditions.

    So both must evaluate as TRUE for the display setting to have effect.

    If any conditions evaluate as FALSE the block will not be displayed.

    If Never is selected as the Display if/when setting irrespective of other conditions the block will never be shown.

  4. In the Tags (Not all) dropdown select the Keap tag(s) the user should not have for the condition to evaluate as TRUE.

    The user must have none 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.

    All tags can be removed from the selection by clicking on the larger X shown to the left of the dropdown marker.

    info

    This Tags(Not all) setting works in conjunction with the Tags(Any) setting. They work as AND conditions.

    So both must evaluate as TRUE for the display setting to have effect.

    If any conditions evaluate as FALSE the block will not be displayed.

    If Never is selected as the Display if/when setting irrespective of other conditions the block will never be shown.

  5. Once the settings have been completed ensure Publish or Update is clicked to save the configuration.


Contact Field Value

Specifying visibility conditions for block based upon Keap contact field value

  1. Locate the Contact Field section in Block Editor block settings, iMember360.

  2. From the Control mode drop down ensure Individual is selected.

  3. In the dropdown select the Keap contact field to be used for the comparison.

    Click the dropdown then scroll or start typing the first characters of the contact field to aid selection.

    Click on the required contact field.

  4. In the dropdown select the comparison operator.

    The comparison operators available are:

    • — (None)
    • Equals
    • Not equal
    • Greater than
    • Less than
    • Greater or equal
    • Less or equal
    • Begins with
    • Ends with
    • Contains
    • Not contains
  5. Specify the value to be used for comparison.

    info

    When entering a date it should be specified in the format that Keap stores the date i.e. yyyymmdd

  6. Once the settings have been completed ensure Publish or Update is clicked to save the configuration.


PHP Statement

Specifying visibility conditions for block based upon conditional PHP statement

  1. Locate the PHP Statement section in Block Editor block settings, iMember360.

  2. From the Control mode drop down ensure Individual is selected.

  3. Define the PHP conditional statement.

    Any valid PHP conditional function can be used.

    iMember360 has conditional functions that can be used:

    i4w_has_tags()

    Here are some examples:

    a. Statement evaluates as TRUE if the user HAS tag 123.

    PHP
    i4w_has_tags( '123' )

    b. Statement evaluates as TRUE if the user HAS tag 123 OR 234.

    PHP
    i4w_has_tags( '123,234' )

    c. Statement evaluates as TRUE if the user HAS tag 123 OR 234.

    PHP
    i4w_has_tags( array(123,234) )

    d. Statement evaluates as TRUE if the user HAS tag 123 AND 234.

    PHP
    i4w_has_tags( '123,234', 'all' )

    e. Statement evaluates as TRUE if the user HAS tag 123 AND 234.

    PHP
    i4w_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.

    PHP
    !i4w_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.

    PHP
    i4w_has_tags( '123' ) && !i4w_has_tags( '234' )

    h. Statement evaluates as TRUE if the user HAS tag 123 OR DOES NOT HAVE tag 234.

    PHP
    i4w_has_tags( '123' ) || !i4w_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.

    PHP
    is_home()
  4. Once the settings have been completed ensure Publish or Update is clicked to save the configuration.