i4w_onlyfor

Usage:

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

[ELSE_onlyfor] conditional branching is supported.

Shortcode nesting is supported:[i4w_onlyfor1] thru [i4w_onlyfor19]

[ELSE_onlyfor1] thru [ELSE_onlyfor19]

Parameters:

tagidOne or more tag ID’s taken from Infusionsoft. If more than one is entered, please separate with commas.
Default: none.
Required: yes, if no contact ID’s are not passed.
contactidOne or more contact ID’s taken from Infusionsoft. If more than one is entered, please separate with commas.
Default: none.
Required: yes, if tag ID’s are not passed.
excl_tagidOne or more tag ID’s taken from Infusionsoft which, if passed, will exclude anyone with any of these tag ID’s, regardless of whether other criteria is met. If more than one is entered, please separate with commas.
Default: none.
Required: no.
require_all_tagsSpecfies whether ALL tags must be present in order to satisfy the “IF” condition.
Default: none.
Required: no.

Example:

Based on Infusionsoft tag ID:

[i4w_onlyfor tagid='123,456,789']
  content-content-content
[ELSE_onlyfor]
  alternate-content-alternate-content
[/i4w_onlyfor]

Based on Infusionsoft tag ID and excluding some contact ID´s:

[i4w_onlyfor tagid='123,456,789' excl_contactid='56,43']
  content-content-content
[ELSE_onlyfor]
  alternate-content-alternate-content
[/i4w_onlyfor]

Based on Infusionsoft cumulative contact ID’s and tag ID´s:

[i4w_onlyfor tagid='123,456,789' contactid='4321,6543,9876']
  content-content-content
[ELSE_onlyfor]
  alternate-content-alternate-content
[/i4w_onlyfor]

Based on Infusionsoft cumulative contact ID’s and requiring ALLtag ID´s to be present:

[i4w_onlyfor tagid='123,456,789' require_all_tags='1' contactid='4321,6543,9876']
  content-content-content
[ELSE_onlyfor]
  alternate-content-alternate-content
[/i4w_onlyfor]

Based on Infusionsoft contact ID and tag ID and excluding some contact ID’s and tag ID´s:

[i4w_onlyfor contactid='4321,6543,9876' tagid='123,456,789' excl_contactid='23,45,56' excl_tagid='87,65,32']
  content-content-content
[ELSE_onlyfor]
  alternate-content-alternate-content
[/i4w_onlyfor]

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]

API:

To use this shortcode in your own PHP code, please use as follows: