Simply wrap your content in the shortcode and set the date/time you’d like it to expire – once that time is eclipsed, it will no longer appear.
The date format is anything that can be parsed by PHP’s strtotime function. A few examples:
- [expires on=”2010-10-01″]Expires on October 1, 2010[/expires]
- [expires on=”Jan 3, 2011″]Expires on January 11, 2011[/expires]
- [expires on=”12/3/2012 23:16:00″]Expires on December 2, 2012 at 11:16pm[/expires]
- [expires on=”2015-01-01 + 15 days”]Expires on January 16, 2015[/expires]
Don’t use relative times like ‘today’ or ‘tomorrow’, as they will be evaluated from the current time/date – not an anchored time/date.
A plugin by Crowd Favorite; we build Big Things with WordPress.
- Use the built-in WordPress.org plugin installer
- Activate the plugin through the ‘Plugins’ menu in WordPress
Contributors & Developers
“CF Expiring Content Shortcode” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- First public release.