Simple Countdown
A plugin for WordPress to display the days, hours and minutes left until an event.
One of the simplest countdown timers to implement on any blog using Wordpress. Simple Countdown can either be added to a Wordpress page template or individual posts to display how many days, hours and minutes remain until an event.
What does Simple Countdown do? Lets say your birthday is coming up in a couple months and you want to give your readers a subtle reminder. Just open up your sidebar.php template and add <?php cc_countdown('My birthday party','september 13, 2007 12am'); ?> wherever you’d like the reminder to display.
When it comes to post-specific countdowns, it’s as simple as adding a comment where you’d like the countdown to appear. By adding <!--cc_countdown:september 13 2007 12am--> you’ll get and inline countdown of days, hours and minutes.
This plugin comes with a few options no matter how you call it. Calling the plugin inside a post gives you the following options:
<!--cc_countdown:EVENT DATE AND TIME, EVENT TITLE-->
- EVENT DATE AND TIME — 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. 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 (optional) — Just write the title of whatever event is happening in plain text. This is an optional parameter and if added to the tag it can display the title of the event before the countdown and the title in an “I’m sorry” message when the event time has passed.
Calling the plugin via PHP gives you the following options:
<?php cc_countdown('EVENT DATE AND TIME', 'EVENT TITLE', AUTO DELETE); ?>
- EVENT DATE AND TIME — 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. This will be displayed as a
pelement on your page/template. - EVENT TITLE — 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. - AUTO DELETE — determines if the countdown timer should be displayed after the event has taken place. A simple
TRUEorFALSEvalue is all that’s needed here. By default, AUTO DELETE is set toTRUE.
Changelog
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.