|Author:||deuts (profile at wordpress.org)|
|WordPress version required:||3.0|
|WordPress version tested:||4.9.8|
|Added to WordPress repository:||17-06-2016|
Click to start download
How to use this plugin?
- When you’re done installing the plugin, just put a
[cntdwn todate="9 January 2019 08:00" timeoff="0"]shortcode into your content. Make sure to change the
todateparameter to your target date, and
timeoffto the GMT offset (in hours) of the time indicated in the
What are the other parameters available?
The complete parameters that you may use in the shortcode, and their default values, are:
todate-> target date to where we’re counting down to;
timeoff-> GMT offset time. Default is 0 or UTC;
sep-> the separator to use in between days, hours, etc. Default is
', '. Feel free to change it to
<br />or otherwise.
showhours-> Show number of hours remaining? Default is
1for true. The
todatemay be too far in the future that render hours irrelevant.
showmins-> Show number of minutes remaining? Default is
1for true. See
showsecs-> Show number of seconds remaining? Default is
0for false. Seconds may only be relevant for countdowns with live timers.
pretext-> The text before the countdown text. Default is
'The event starts in ';
posttext-> The text following the countdown text. Default is
donemsg-> The text message when the countdown is done. Default is
'The countdown is done.'.
What’s the standard format for the `todate` parameter?
- Anything that can be parsed by the
strtotimephp function can be used in the
todateparameter. But in order to avoid confusion, it’s better to stick with the format as the sample above.
How to put the countdown in my theme files?
- The do_shortcode() can do that for you.
Is there a widget available for the sidebar?
- No. But this article can show you how to use a shortcode in the sidebar widget.
Is there a working demo for this plugin?
- If the target date hasn’t come yet, you might see a working demo of the plugin at ChessHive.
- Bug fix to get rid of “A non well formed numeric value encountered” error.
- Updated descriptions.
- Changed function name to make it more unique and avoid conflicting with other functions.
- Original version.