WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Show/Hide Content at Set Time

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.

I also run Do It With WordPress, which has an array of tutorials for managing, modifying and maintaining your WordPress sites, as well as The WP Butler, a service for keeping your site maintained, backup up, updated and secure.

Requires: 2.5 or higher
Compatible up to: 3.7.1
Last Updated: 2013-9-14
Downloads: 3,643

Ratings

4 stars
4.8 out of 5 stars

Support

0 of 1 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1
100,1,1
100,1,1
100,2,2