Skip to content

i4w_showafter

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

The content embedded between the shortcode’s begin and ending tags will be displayed if either the subscriber has been registered at least the number of days or weeks specified in the shortcode parameters or, if a date parameter is given, the given number of days or weeks have passed since that date.

[ELSE_showafter] conditional branching is supported.

Shortcode nesting is supported: [i4w_showafter1] thru [i4w_showafter19]

[ELSE_showafter1] thru [ELSE_showafter19]

ParameterDescriptionDefaultRequired
daysSpecifies the minimum number of “membership” days.noneYes, if weeks is not selected
weeksSpecifies the minimum number of “membership” weeks.noneYes, if days is not selected
dateSpecifies the base date for the time difference calculation.user’s registration dateNo
Shortcode
[i4w_showafter days='7']
Display if the subscriber has been a member at least 7 days
[ELSE_showafter]
Sorry, you must have been a member for at least 7 days to view this content.
[/i4w_showafter]
Shortcode
[i4w_showafter weeks='2']
Display if the subscriber has been a member at least 2 weeks
[ELSE_showafter]
Sorry, you must have been a member for at least 2 weeks to view this content.
[/i4w_showafter]
Shortcode
[i4w_showafter date='2012-01-01' weeks='2']
Sorry, it's too late now…
[ELSE_showafter]
Great… You're just in time!
[/i4w_showafter]