plugin-icon

LukaCodes Content Expiry Shortcode

Door LukaCodes·
We help you show temporary WordPress content until a chosen date and time with the simple [lcexp] shortcode.
Versie
1.1.1
Laatst bijgewerkt
Mar 24, 2026
LukaCodes Content Expiry Shortcode

We created LukaCodes Content Expiry Shortcode for cases where we want to publish content for a limited period and let it expire automatically without having to come back and edit the page later.

With the [lcexp] shortcode, we can wrap any temporary content inside a date-based rule. Until the selected date and time, the content is shown normally. Once that time passes, the plugin replaces it with a clear expiry message.

This makes the plugin useful for many everyday WordPress tasks, such as:

  • limited-time offers
  • temporary announcements
  • event notices
  • holiday messages
  • launch updates
  • short-term promotional text

Instead of removing content manually after a campaign or announcement ends, we can set the expiry date in advance and let the plugin handle it for us.

How we use it

We place the shortcode around the content we want to display temporarily:

[lcexp "30-06-2026 23:59"]This content will stay visible until the selected date and time.[/lcexp]

Before the selected date and time: the content inside the shortcode is displayed normally.

After the selected date and time: the content is replaced automatically with the message:

This content is no longer available.

Accepted date formats

We can use the shortcode with the following formats:

  • DD-MM-YYYY HH:MM
  • DD-MM-YYYY

We also support slash-separated dates such as:

  • DD/MM/YYYY HH:MM
  • DD/MM/YYYY

Examples

[lcexp "30-06-2026 23:59"]This offer ends tonight.[/lcexp] [lcexp "25-12-2026"]Holiday message[/lcexp] [lcexp "18:30 15-08-2026"]Event reminder[/lcexp]

What we wanted to keep simple

We designed this plugin to stay lightweight and practical. We did not want to add unnecessary setup screens for something that can be handled directly inside the editor with a shortcode.

Features

  • simple shortcode-based usage
  • automatic content expiry by date and time
  • works in posts and pages
  • works in WooCommerce product descriptions and short descriptions
  • supports nested shortcode content through normal shortcode rendering
  • uses the WordPress site timezone
  • lightweight and easy to use
  • multilingual-ready

Premium

We also offer a Premium version at:

https://lukacodes.com/plugins/content-expiry-shortcode/

In the Premium version, we expand the experience with additional tools such as a visual Gutenberg workflow and faster content insertion options.

Third-Party Service

This plugin integrates with Freemius for optional telemetry, upgrade handling, and the deactivation feedback form.

Freemius is only connected after the site owner explicitly opts in. If the opt-in is declined, no telemetry is sent.

Service provider: Freemius Website: https://freemius.com Terms of service: https://freemius.com/terms/ Privacy policy: https://freemius.com/privacy/

When a site owner opts in, Freemius may collect basic diagnostic and site data such as the website URL, WordPress version, plugin version, PHP version, language, and activation/deactivation events. If the site owner submits the deactivation form, the selected reason and optional feedback are also sent.

Gratisvoor betaalde abonnementen
Door te installeren, ga je akkoord met de Servicevoorwaarden van WordPress.com en de voorwaarden voor plugins van derden.
Getest tot
WordPress 6.9.4
Deze plugin kan worden gedownload, zodat je hem op je kan gebruiken.