mbr_show_between
Usage
This shortcode determines the content to be included based upon whether the current date is between the two inclusive specified dates.
The specified dates 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. |
date2 | The second 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. In addition this parameter can also be any text operator that follows the syntax rules as detailed for PHP strtotime() to adjust the date parameter e.g. +1 week, +5 days, +2 months etc. to determine date2 .Default: none. Required: yes. |
Validity
This shortcode is evaluated for any type of visitor.
Conditional Branching
[ELSE_show_between] conditional branching is supported.
Nesting
Shortcode nesting within is NOT supported.
Examples
- Example 1
- Example 2
- Example 3
- Example 4
Displays 'Here is your special offer available for a limited time' if the current date is on or after 2021-Sept-30 and on or before 2021-Dec-31:
[mbr_show_between date='2021-09-30' date2='2021-12-31']
Here is your special offer available for a limited time
[/mbr_show_between]
Displays 'Here is our special bonus' if the current date is on or after 2021-Sept-30 and on or before 90 days later than 2021-Sept-30. Otherwise 'Sorry, you missed the bonus period' is shown:
[mbr_show_between date='2021-09-30' date2='+90 days']
Here is our special bonus
[ELSE_show_between]
Sorry, you missed the bonus period
[/mbr_show_between]
Displays 'Here is your new member bonus' if the current date is after the date stored within the ActiveCampaign contact field with perstag joiningdate
for the remote user and on or before 30 days after that joiningdate
:
[mbr_show_between date='%JOININGDATE%' date2='+30 days']
Here is your new member bonus
[/mbr_show_between]
Displays 'Here is your limited time offer' if the current date is on or after the date stored within the ActiveCampaign contact field my_custom_field
for the remote user and on or before 1 week after that date stored in my_custom_field
:
[mbr_show_between date='[mbr_db_my_custom_field]' date2='+1 week']
Here is your limited time offer
[/mbr_show_between]
API
There is currently no ActiveMember360 API function equivalent for this shortcode.