THIS PLUGIN IS DUE TO BE RETIRED! I therefore intend to update it no further and will have it removed from the repository in the coming months. If you are interested in taking over ownership of the plugin, please contact me via the forum. Alternatively, I would highly recommend looking at the identically named Timed Content plugin.
After installation use the shortcode
[timed] around any post or page contents that you wish to appear or expire on a specific date and/or time.
Six parameters can be used –
ondate : Date after which you wish the content to appear, in format YYYYMMDD.
offdate : Date after which you wish the content to expire, in format YYYYMMDD.
ontime : Time after which you wish the content to appear, in format HHMM.
offtime : Time after which you wish the content to expire, in format HHMM.
onday : Day on which you wish the content to appear – 1 (for Monday) through 7 (for Sunday)
offday : Day on which you wish the content to expire – 1 (for Monday) through 7 (for Sunday)
If any of these aren’t specified then a logical alternative is found – e.g. not specifying
ontime means the text will appear immediately (until the conditions of any expiry date/time is met).
Here’s some examples of use..
[timed offdate="20122412"]It's nearly Christmas![/timed]
This will cause the message to disappear after the 24th December 2012.
[timed ondate="20120101" offdate="20121231"]It's 2012[/timed]
This will cause the message to only appear during the year 2012.
[timed ondate="20120101" offdate="20121231" ontime="0800" offtime="1200"]It's between 8am and midday[/timed]
This will cause the message to appear between 8am and midday during the year 2012.
[timed onday="1" offday="3"]It's Monday to Wednesday[/timed]
This will cause the message to only appear Monday, Tuesday and Wednesday.
If you wish to use this facility elsewhere in your theme – e.g. your sidebar – then you can do by calling a PHP function.
It uses the same parameters as above, each seperated by an ampersand.
This will return either TRUE or FALSE depending on whether the content should be displayed or not. So, a full example may be…
<?php if ( function_exists( 'timed_content' ) ) : ?> <?php if ( timed_content( 'ondate=20120101&offdate=20121231' ) ) : ?> Some content goes here <?php endif; ?> <?php endif; ?>
This will only display the content if it’s any date during the year 2012.
If you would like to add a translation to his plugin then please contact me
This WordPress plugin is licensed under the GPLv2 (or later).
Thanks to Jeff Kereakoglow for the
offday suggestions, as well as pointing out the bug with the time.
Timed Content can be found and installed via the Plugin menu within WordPress administration. Alternatively, it can be downloaded and installed manually…
- Upload the entire
simple-timed-contentfolder to your wp-content/plugins/ directory.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- That’s it – use the shortcode or function call where required.
We just started our site, and this plugin works PERFECTLY for our purposes! We were so sad to see that the author, David Artiss, has decided not to continue support for this plugin, and suggested to use another with the same name. Other plugins, even the one Artiss mention by K. Tough, don’t allow day-specific short codes, like his does. It’s being utilized currently on JPRadio.org, i.e., until he takes it away. We were urged to post this review, in the selfish hopes that in addition to this review, a modest donation would make him reconsider pulling the plug on this plugin. ='(
This is a good plugin. Just works like expected. But it needs to be simpler. A novice will find it too much complex.
Contributors & Developers
“Timed Content” is open source software. The following people have contributed to this plugin.Contributors
- Enhancement: Who forgot to add code to actually load the translations? Yes, that was me. Sorry. Now done.
- Maintenance: Added a text domain and domain path.
- Maintenance: Tiny, tiny change but one with big impact. Some users were getting prompts to update to a totally different plugin – same name, different author, not as good. That’s now sorted.
- Enhancement: Added internationalisation
- Maintenance: Corrected support forum link
- Maintenance: Brought code quality up-to-date
- Maintenance: README updated
- Enhancement: Allow a shortcode to be used with the content
- Enhancement: Added meta links to plugin screen entry
- Fixed bug causing timings to not operate correctly
- Use local time rather than server time
- Added function call to allow timed content in other areas of theme
- Re-written (and simplified) logic that decides if content should be shown or not
- Minor changes and enhancements
- Initial release