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:
- Button / Link: Simple inline button or link
- Text: Longer text and html content
Buttons and Links
[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:
- Type:
buttonorlink, both will be an html anchor, button will add the.btnclass - Date (Required): YYYY-MM-DD eg: 2026-09-03 for Sept. 3, 2026
- Time (Optional): 24 hour format with the Toronto timezone
- 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:
- Type:
text - Date (Required): YYYY-MM-DD eg: 2026-09-03 for Sept. 3, 2026
- Time (Optional): 24 hour format with the Toronto timezone
- Content: This should be full html.