mbr_show_after
Usage
This shortcode determines the content to be included based upon whether the current date is after the specified date adjusted as requested.
The specified date can be:
The current date.
Any date formatted according to the the syntax rules set for PHP as detailed within date formats.
Any ActiveCampaign contact date field. Most ActiveCampaign date fields are properly formatted and will function correctly.
The date field is specified by using the ActiveCampaign personalization tag for the contact field (Perstag) with the characters % before and after the tag for the
date
parameter. The available Perstags can be found in ActiveMember360, Utilities, Contact Fields.Alternatively see [mbr_contact] for information upon how to reference ActiveCamapign contact fields.
The logged in users registration date for WordPress specified by using
#USER_REGISTERED#
for thedate
parameter.
Parameters
Parameters | Description |
---|---|
date | The specified date must provide a value that follows the syntax rules set for PHP as detailed within date formats. Most ActiveCampaign date fields are properly formatted and will work. Default: none. Required: yes. |
adjust | Any text operator that follows the syntax rules as detailed for PHP strtotime(). This will modify the specified date. Default: none. Required: no. |
Validity
This shortcode is evaluated for any type of visitor.
Conditional Branching
[ELSE_show_after] conditional branching is supported.
Nesting
Shortcode nesting within is NOT supported.
Examples
- Example 1
- Example 2
- Example 3
- Example 4
- Example 5
- Example 6
Displays 'Here is the special offer' if the current date is after 2021-Dec-05:
[mbr_show_after date='20211205']
Here is the special offer
[/mbr_show_after]
Displays 'Here is the special offer' if the current date is after 2021-Dec-05 otherwise it returns 'Sorry the special offer is not yet available':
[mbr_show_after date='20211205']
Here is the special offer
[ELSE_show_after]
Sorry the special offer is not yet available
[/mbr_show_after]
Displays 'Here is the special offer' if the current date is after 2022-Mar-03 i.e. 2021-Dec-03 with 3 months added:
[mbr_show_after date='20211203' adjust='+3 months']
Here is the special offer
[/mbr_show_after]
Displays 'Here is your bonus for staying with us' if the current date is after the date of the logged in users WordPress registration with +30 days added:
[mbr_show_after date='#USER_REGISTERED#' adjust='+30 days']
Here is your bonus for staying with us
[/mbr_show_after]
Displays 'Here is your next lesson' if the current date is after the date stored within the ActiveCampaign contact field with perstag joiningdate
for the remote user with 10 days added. Otherwise 'No further lessons yet available' is shown:
[mbr_show_after date='%JOININGDATE%' adjust='+10 days']
Here is your next lesson
[ELSE_show_after]
No further lessons yet available
[/mbr_show_after]
Displays 'Here is your bonus content' if the current date is after the date stored within the ActiveCampaign contact field my_custom_field
for the remote user with 1 week added:
[mbr_show_after date='[mbr_db_my_custom_field]' adjust='+1 week']
Here is your bonus content
[/mbr_show_after]
API
There is currently no ActiveMember360 API function equivalent for this shortcode.