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
| Parameter | Description | Default | Required |
|---|---|---|---|
| tagid | One or more tag ID's taken from Keap. If more than one is entered, please separate with commas. | none | Yes, if contactid is not used |
| contactid | One or more Keap contact ID's. If more than one is entered, please separate with commas. | none | Yes, if tagid is not used |
| excl_tagid | One or more Keap tag ID's to be excluded. If more than one is entered, please separate with commas. | none | No |
| excl_contactid | One or more Keap contact ID's to be excluded. If more than one is entered, please separate with commas. | none | No |
| require_all_tags | Specifies whether ALL tags must be present in order to satisfy the "IF" condition. | none | No |
Example
Based on Keap tag ID:
[i4w_hidefrom tagid='123,456,789']
content-content-content
[ELSE_hidefrom]
alternate-content-alternate-content
[/i4w_hidefrom]
Based on Keap contact ID:
[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:
[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:
[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:
[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:
[i4w_hidefrom tagid='234,789' excl_tagid='456,321']
content-content-content
[ELSE_hidefrom]
alternate-content-alternate-content
[/i4w_hidefrom]