Menu
All plugins

Content Expiry

Wrap content in [content_expiry], set a date, and it is removed from the page once that moment passes. Nothing is left behind: no empty wrapper and no hidden markup. Each example shows the shortcode used, then what a visitor sees. Read the docs.

1. Live until the end of a day

[content_expiry date="2030-12-31"]Winter offer: 10% off bookings made before the end of 2030.[/content_expiry]

Winter offer: 10% off bookings made before the end of 2030.
A date on its own keeps the content up for the whole of that day, then removes it at midnight.

2. Fallback text after expiry

[content_expiry date="2024-01-01" fallback="This offer has ended."]Early-bird price[/content_expiry]

This offer has ended.
This date has passed, so the content is replaced by the fallback text.

3. An exact time

[content_expiry date="2030-12-31" time="18:00" timezone="Europe/London"]Book by 6pm for same-day confirmation.[/content_expiry]

Book by 6pm for same-day confirmation.
Goes offline at 6pm UK time. Use timezone if the site timezone is set to a plain UTC offset.

4. Start date: hidden until it opens

[content_expiry start="2030-01-01" date="2030-12-31"]Our 2030 price list[/content_expiry]

Nothing shows before the start date. This one opens on 1 January 2030, so the box above is empty on purpose.

5. Expired with no fallback

[content_expiry date="2024-01-01"]Old announcement[/content_expiry]

Expired and no fallback: it simply is not on the page. Check the page source if you like.

Previewing and caching

Logged-in editors can preview any moment by adding ?content_expiry_preview=2031-01-01 to this page address. The Bricks builder always shows the content so it can still be edited. Cached pages are purged at the exact moment content expires or goes live, on the cache plugins the docs list.