i4w_showbetween

Usage:

This shortcode enables segmenting content within a page, post, excerpt or text widget based on either a subscriber’s WordPress registration date, a date passed to the shortcode or based on the date that tags were assigned to the contact.

The content embedded between the shortcode’s begin, ELSE and ending tags will be displayed if the subscriber meets the time requirements set forth in the shortcodes’s parameters.

[ELSE_showbetween] conditional branching is supported.

Shortcode nesting is NOT supported.

Parameters:

date Specifies the base date for the date range computations. If not specified, the subscriber’s initial registration date will be used. Valid entires are any PHP compatible date representation, the word ‘tagdate’ or no value.
Default: user’s registration date.
Required: no.
afterdays Specifies the minimum number of “membership” days.
Default: none.
Required: yes, if “afterweeks” is not defined.
beforedays Specifies the maximum number of “membership” days.
Default: none.
Required: yes, if “beforeweeks” is not defined.
afterweeks Specifies the minimum number of “membership” weeks.
Default: none.
Required: yes, if “afterdays” is not selected.
beforeweeks Specifies the maximum number of “membership” weeks.
Default: none.
Required: yes, if “beforedays” is not selected.
tagid Optionally provide a comma separated list of Infusionsoft tag ID’s for which this shortcode should check.
Default: none.
Required: no.
require_all_tags Optionally specifiy whether the subscriber must have all specified tags in order to see content. Otherwise, falls back to ELSE content, if provided.
Default: none.
Required: no.

Example:

[i4w_showbetween afterdays='7' beforedays='15']
  Display content if the subscriber has been a member at least 7 days but not more than 14 days.
[ELSE_showbetween]
  Display alternate (teaser) content if the subscriber has not been a member between 7 and 14 days.
[/i4w_showbetween]

[i4w_showbetween afterweeks='2' beforeweeks='4']
  Display (teaser) if the subscriber has been a member at least 2 weeks but not more than 4 weeks.
[ELSE_showbetween]
  Display alternate (teaser) content if the subscriber has not been a member between 2 and 4 weeks.
[/i4w_showbetween]

[i4w_showbetween date='2012-05-01 00:00:00' afterdays='7' beforedays='14']
  Display content starting 7 days after May 1st, 2012 and stop displaying it 14 days after May 1st, 2012.
[ELSE_showbetween]
  Display alternate (teaser) content whenever “today” is outside the specified date range.
[/i4w_showbetween]

[i4w_showbetween tagid='12,34,56' afterdays='1' beforedays='30' require_all_tags='y']
  Display content starting 1 days after initial registration and for up to 30 days thereafter, if the subscriber has ALL specified tag ID's (12,34,56).
[ELSE_showbetween]
  Display alternate (teaser) content whenever “today” is outside the specified date range or the subscriber doesn't have one or more of the specified tag ID's.
[/i4w_showbetween]

[i4w_showbetween date='tagdate' tagid='12,34,56' afterdays='7' beforedays='14']
  Display content starting 7 days after the assignment date of “earliest” tag and stop displaying it 14 days after the assignment date of the “earliest” tag.
[ELSE_showbetween]
  Display alternate (teaser) content whenever “today” is outside the specified date range.
[/i4w_showbetween]

Notes:

This shortcode works independently of the “Gradual Content Release” settings in the “Plugin Options” panel. You may segment parts of a page or post even if you have not activated “Gradual Content Release”.

API:

There is no API function equivalent for this shortcode.