Skip to main content

Expiring Text

Overview

[cpd-expires type="type" date="date" time="time" url="url" text="text"]content goes here[/cpd-expires]

Often on a microsite you have a situation where you want content to disappear after a certain date. This is frequently a link such as a registration link embedded in the content of the page, rather than using the system/theme.

This shortcode will allow you to have content disappear after the date or optional time.

There are two basic scenarios:

  1. Button / Link: Simple inline button or link
  2. Text: Longer text and html content
[cpd-expires type="button_or_link" date="2026-MM-DD" time="24_Hour_Time" url="Full_URL" text="Button_or_Link_Text" /]

Important: Note the end of the shortcode is /]

Parameters:

  1. Type: button or link , both will be an html anchor, button will add the .btn class
  2. Date (Required): YYYY-MM-DD eg: 2026-09-03 for Sept. 3, 2026
  3. Time (Optional): 24 hour format with the Toronto timezone
  4. Text: Should be short

Content

Sometimes you need to have a block of content expire / disappear after a certain date. This is where the self-enclosing WordPress shortcode is used. [cpd-expires ...]content[/cpd-expires]

This can be used around a paragraph or a even a block of html code.

Note the url and text shortcode parameters are no longer used.

[cpd-expires type="text" date="2026-MM-DD" time="24_Hour_Time"]content[/cpd-expires]

Parameters:

  1. Type: text
  2. Date (Required): YYYY-MM-DD eg: 2026-09-03 for Sept. 3, 2026
  3. Time (Optional): 24 hour format with the Toronto timezone
  4. Content: This should be full html.