Want a simple way to have content appear and disappear on your site?

Create this simple lava shortcode to have content that goes away when you tell it to.

Home > Admin Tools > CMS Configuration > Lava Shortcodes

Name: Show Until

Tag Name: showuntil

Tag Type: Block

Description:

Displays Content until a date time is reached.

Documentation:

Basic Usage:
{[showuntil datecode:'202004151200']}content{[endshowuntil]}

Shortcode Markup:

{% assign ts = 'Now' | Date:'yyyyMMddHHmm' | Plus:0 %}{% if ts < {{datecode}} %}content{% endif %}

Parameters:

Key: datecode


You can also create a opposite shortcode for to display content after a date and time is reached.

Name: Show After

Tag Name: showafter

Tag Type: Block

Description:

Displays Content after a date time is reached.

Documentation:

Basic Usage:
{[showafter datecode:'202004151200']}content{[endshowafter]}

Shortcode Markup:

{% assign ts = 'Now' | Date:'yyyyMMddHHmm' | Plus:0 %}{% if ts > {{datecode}} %}content{% endif %}

Parameters:
Key: datecode