Show/Hide Content at Set Time
Shortcodes to wrap around text, which specify at what date or time that content should appear or disappear, either once, or on a recurring basis.
The facts
- Rating
- 4.9★ from 33
- Active installs
- 10k+
- Price
- Free
- Last updated
- 1 Oct 2019
- Added
- Jun 2011
- Requires WP
- 2.5
- Tested up to
- WP 5.2.26
- Downloads
- 41,086
Our analysis
AI-assistedShow/Hide Content at Set Time is a WordPress plugin that allows you to control the visibility of content based on specific dates and times using shortcodes. You can display content until a certain date, show it after a specific time, or set recurring schedules for content visibility.
This plugin is suitable for users who need to manage time-sensitive information on their websites, such as promotions or event details, and want to automate the display of this content without manual updates.
Best for: Website owners who need to manage time-sensitive content effectively.
What it does well
- ✓Provides shortcodes for showing and hiding content
- ✓Supports single use and recurring schedules
- ✓Compatible with various date and time formats
Where it falls short
- •Limited feature information provided
- •May require familiarity with shortcodes for effective use
Verdict
This plugin offers a straightforward solution for displaying content based on time constraints, but its usability depends on your comfort with shortcodes.
From the developer
Dave Clements's own description of Show/Hide Content at Set Time, lightly tidied.
Like this plugin? Consider leaving a quick review or writing about how you’ve used it on your site – send me a link to that write up if you do.
This plugin is maintained on GitHub, so feel free to use the repository for reporting issues, submitting feature requests and submitting pull requests.
This plugin provides shortcodes allowing you to display content or hide content at given dates and times. You can also combine the two to show some content at a given time, and then hide it at another time.
There’s also a separate shortcode if you want to repeat a schedule for showing and hiding content – for example to only show information about a radio show while it’s on air.
Usage – single use
To show or hide content at one point in time, you can use the [time-restrict] shortcode. For example:
[time-restrict off="2015-01-01"]Please enter our competition[/time-restrict]
[time-restrict on="2015-01-01"]Sorry, this competition has closed[/time-restrict]
If you do not enter a time with the date, it will default to 00:00:00, so in the above example, the first message will show up until 2015-01-01 00:00:00 (i.e. until the first second of 2015) and the second message will show up from 2015-01-01 00:00:00 (i.e. from the first second of 2015)
You can use any date or time string supported by PHP, such as:
[time-restrict off="September 10th, 2014"]Will display until 09/10/2014[/time-restrict]
[time-restrict off="2014-09-10"]Will display until 09/10/2014[/time-restrict]
[time-restrict off="10-Septmber 2014"]Will display until 09/10/2014[/time-restrict]
[time-restrict on="2014/09/10 18:00:00"]Will show after 09/10/2014 at 6pm[/time-restrict]
You can also combine starting and ending dates for the same piece of content. So if you want some content to appear between January 1st and January 10th, you could do the following:
[time-restrict on="2015-01-01" off="2015-01-11"]
This is a limited time offer
[/time-restrict]
Usage – repeating schedule
To show and hide content on a recurring schedule, you can use the [time-restrict-repeat] shortcode. Your options are a daily, weekly, monthly or annual schedule.
A daily schedule takes the following form:
[time-restrict-repeat type="daily" ontime="09:00:00" offtime="17:00:00"]
Working 9 to 5
[/time-restrict-repeat]