Skip to main content

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 the date parameter.

Parameters

ParametersDescription
dateThe 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.
date2The 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

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]

API

Note

There is currently no ActiveMember360 API function equivalent for this shortcode.