| 开发者 | luka2013 |
|---|---|
| 更新时间 | 2026年3月25日 00:01 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[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:
[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:MMDD-MM-YYYYDD/MM/YYYY HH:MMDD/MM/YYYY[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
lukacodes-content-expiry-shortcode folder to the /wp-content/plugins/ directory, or install the plugin through the WordPress Plugins screen.[lcexp "30-06-2026 23:59"]Your content here[/lcexp]We place the content we want to show temporarily between the opening and closing shortcode tags.
Example:
[lcexp "30-06-2026 23:59"]This content will expire automatically.[/lcexp]
The date inside the shortcode tells the plugin when that content should stop being displayed.
After the selected date and time passes, the plugin replaces the content with the message:
This content is no longer available.
We recommend using:
DD-MM-YYYY HH:MM
Example:
[lcexp "30-06-2026 23:59"]Temporary content[/lcexp]
We also support date-only format:
DD-MM-YYYY
and slash-separated dates such as:
DD/MM/YYYY HH:MM
We use your WordPress site timezone. You can check or change it from: Settings > General > Timezone
Yes. We can use the shortcode in both the Classic Editor and the Block Editor.
Yes. We can use multiple [lcexp] shortcodes on the same page with different dates and different content.
After expiry, the original content is no longer shown. In its place, the plugin displays a clear expiry message so visitors do not see an empty gap.
Yes. We built it to work independently of the active theme.
[lcexp] shortcode now works inside product descriptions and short descriptions.[lcexp] shortcode for expiring temporary content by date and time.DD-MM-YYYY HH:MM and DD-MM-YYYY formats.