Skip to main content

i4w_hidefrom

Usage

This shortcode is designed to segment content on a page, post, excerpt or text widget by displaying the embedded content to all subscribers except to those subscribers whose memberships or Keap contact ID's match the criteria passed as parameters. There are three variants, depending on the parameters used.

[ELSE_hidefrom] conditional branching is supported.

Shortcode nesting is supported: [i4w_hidefrom1] thru [i4w_hidefrom19]

[ELSE_hidefrom1] thru [ELSE_hidefrom19]

Parameters

ParameterDescriptionDefaultRequired
tagidOne or more tag ID's taken from Keap. If more than one is entered, please separate with commas.noneYes, if contactid is not used
contactidOne or more Keap contact ID's. If more than one is entered, please separate with commas.noneYes, if tagid is not used
excl_tagidOne or more Keap tag ID's to be excluded. If more than one is entered, please separate with commas.noneNo
excl_contactidOne or more Keap contact ID's to be excluded. If more than one is entered, please separate with commas.noneNo
require_all_tagsSpecifies whether ALL tags must be present in order to satisfy the "IF" condition.noneNo

Example

Based on Keap tag ID:

Shortcode
[i4w_hidefrom tagid='123,456,789']
content-content-content
[ELSE_hidefrom]
alternate-content-alternate-content
[/i4w_hidefrom]

Based on Keap contact ID:

Shortcode
[i4w_hidefrom contactid='4321,6543,9876']
content-content-content
[ELSE_hidefrom]
alternate-content-alternate-content
[/i4w_hidefrom]

Based on both Keap contact ID and tag ID:

Shortcode
[i4w_hidefrom contactid='4321,6543,9876' tagid='123,456,789']
content-content-content
[ELSE_hidefrom]
alternate-content-alternate-content
[/i4w_hidefrom]

When nesting [i4w_onlyfor] or [i4w_hidefrom] shortcodes within one another, add a number to reflect the nesting level:

Shortcode
[i4w_hidefrom1 tagid='987,654,321']
[i4w_onlyfor2 tagid='123,456,789']
content-content-content
[ELSE_onlyfor2]
alternate-content-alternate-content
[/i4w_onlyfor2]
[/i4w_hidefrom1]

Based on Keap tag ID but excluding anyone with a specific tag ID:

Shortcode
[i4w_hidefrom tagid='234,789' excl_tagid='456']
content-content-content
[ELSE_hidefrom]
alternate-content-alternate-content
[/i4w_hidefrom]

Based on Keap tag ID's but excluding anyone with certain contact ID's:

Shortcode
[i4w_hidefrom tagid='234,789' excl_tagid='456,321']
content-content-content
[ELSE_hidefrom]
alternate-content-alternate-content
[/i4w_hidefrom]