This plugin, aptly dubbed Simple Countdown, lets you pick a title for the event or time you're counting down to and merely displays the title along with the remaining days, hours and minutes until the event occurs. The great thing about Simple Countdown is that you can use a plain english date and time, e.g., "next tuesday" or "july 23, 2006 noon"
Call the plugin with the following code (be sure to remove any extra spaces after the opening "less than" symbol and before the closing "greater than" symbol — WP keeps adding extra spaces when I post/edit this article).
From the sidebar or template file:
< ?php cc_countdown('EVENT DATE AND TIME', 'EVENT TITLE', AUTO DELETE); ?>
From within a post:
<!--cc_countdown:EVENT DATE AND TIME, EVENT TITLE-->
The title of the event and time remaining until it occurs will both be written to the page wherever the plugin is called.
- EVENT DATE AND TIME
- (string) the date and time of your event can be written many ways, plain text, like the example above, or using digits, e.i., 09/13/2007. When calling the plugin from a post, placing a "-" (dash or minus sign) in front of the EVENT DATE AND TIME will remove the countdown after the date/time has passed.
- EVENT TITLE
- (string) Just write the title of whatever event is happening in plain text. This will be displayed as an
h5element on your page/template so make sure you've got a nice style for it. When calling the plugin from a post, this is an optional parameter and if added to the tag it can display the title of the event before the countdown. The title will be replaced with an "I'm sorry" message when the event time has passed.
- AUTO DELETE
- (boolean) Determines whether the countdown should be displayed after the event has occurred. If AUTO DELETE is set to
FALSEwhen the event has passed "(Your event title) has already happened" will display wherever the plugin is called. Default is
Version 1.0.1 — October 27, 2006
- Changed the output of the countdown for RSS readers to ask visitors to view the actual website to see the countdown. Without this message the post would constantly be marked as new because of the changing timer.
Version 1.0 — October 25, 2006
- Added ability to call the plugin from inside posts
- Modified some of the internal code structure
- Renamed the plugin, must now be called via
Version 0.4 — July 8, 2006
- Added the ability to display years if the event is that far away
- Better grammar formation
- Changed the date difference calculations to use less code
- Removed a bunch of useless comments and unused code
Version 0.2 — June 18, 2006
- Released to the public
To install Simple Countdown, download the latest version from the top of this page and expand the .zip file. Upload the
ms_countdown.php file to your
When the file is finished uploading, log into your WP admin page and click on the activate link in line with the Simple Countdown plugin. The plugin is now installed and active.
To show the countdown to whatever event you're counting down to, open up the theme page, such as
single.php, etc. — found in the
wp-contents/theme/ folder — in a text editor like TextMate, Dreamweaver or even NotePad.
Once you've located the spot you'd like the countdown to show on that particular page, simple use the usage instructions at the top of this page to display the countdown. Save the file and upload it to your theme directory.
Questions, comments, suggestions
I always welcome questions, comments and suggestions on the WP plugins I release. If there is something you think I should add, let me know. Having trouble with the plugin as it is? I'm here for you. Just want to say thanks? Write about it on your blog.