Creates shortcodes which you can wrap around text, which specify at what date or time that content should appear or disappear. Great for competitions
This plugin allows you to wrap certain parts of your post content in a shortcode and enter a date or time when that content should either appear, or disappear.
For example, if you have a competition that ends on 12/31/2012, you can use:
[expires off="2013-01-01"]Please enter our competition[/expires]
[showafter on="2013-01-01"]Sorry, this competition has closed[/showafter]
This is because on the 31st, you still want to be advertising the competition and you don't want to say its closed until the 1st of January.
You can use any date or time string supported by PHP, such as:
[expires off="10 September 2012"]Will expire on 09/10/2012[/expires]
[expires off="2012-09-10"]Will expire on 09/10/2012[/expires]
[expires off="Septmber 10th, 2012"]Will expire on 09/10/2012[/expires]
[showafter on="2012.09.10 18:00:00"]Will show after 09/10/2012 at 6pm[/showafter]
Bear in mind that by just entering a date, it will assume a time of midnight at the beginning of that date. So if you set your expiration date to today, it will expire at the beginning of today (12:00:00AM), not the end of the day. If you would prefer to show the content for the rest of today, then you should set your expiration date to tomorrow.
Thanks to Alex King and Crowd Favorite for their original code in the Expiring Content Shortcode.
Check out Do It With WordPress for more plugins and tutorials.
Requires: 2.5 or higher
Compatible up to: 3.3.2
Last Updated: 2011-7-28
Downloads: 1,166
Got something to say? Need help?