Plugin Directory




The page is now depreciated. Please view the updated page at http://www.andrewferguson.net/wordpress-plugins/countdown-timer/


This plugin allows you to setup a series of dates to countdown to in terms of years, days, hours, minutes, and seconds. It’s basically the same thing from my previous web site, I just took that code and made it WP friendly. Information also comes from a text file instead of mySQL query.

CountdownTimer was originally hosted at http://www.andrewferguson.net/wordpress-plugins/#countdowntimer


Wordpress Versions:

  • 1.5.*
  • 2.0.*
  • In theory, it should work with 1.2.*, but it has not been tested.


Here’s the code you need in insert into your sidebar.php file:

<li id='countdown'><h2>Countdown:</h2>
      <?php afdn_countdownTimer(); ?>

If you want to call the timer from within the WP Loop, make sure The Loop function is enabled in the plugin configuration and then insert:


where you want the timer displayed.


Latest version:

Latest Beta:

Errors and Ideas

Previous errors/ideas were reported to in the comments section, please submit errors/ideas using the TracWiki Ticket System or by sending an email to afdn_countdowntimer@….


1.4 (Changeset: 5872)

This is the first release using the WordPress SVN. It's kind of been cool using the SVN because it is easier to see what changes have been made from version to version. In any event, this release has a couple of updates. First, there is an option to include the timer from within the WP Loop, that is you can now display the timer from within a post or page (see instructions for the specifics). The idea came from Ronny a mere four days ago, just to give you an idea of the turn around time on suggestions to release. Because of the way the plugin is implemented, I also had to modify the main function that gets the ball rolling on displaying the timer. It's designed to be backwards compatible, so you shouldn't have any problems. I also had to rewrite parts of the version check system to work with the SVN. The format is actually much better and just calls one text file which lists the latest version (i.e. "1.4"). It compares that to the current version and let's you know if there's a new version. Simple! As always, you can turn the feature off.

03-16-2006 - Current Version - Countdown Timer v1.4


I’ve already received some preliminary feedback on 1.2 (thanks Dave), so I’ve made a couple of updates. First, there are actually instructions for configuring the onHover Time Format option. Second, if you leave onHover Time Format blank, it will remove the dashed underline on the timer so no one is confused. I also fixed a really stupid bug, I never but a stripslashes in. So if you tried using something that needed escaping (such as an apostrophe), you would get a slash. That doesn’t happen anymore. Enjoy!

03-16-2006 - Countdown Timer v1.3


Development has been slow. Not really a lot to do. But version 1.2 offers some great things, including a bug fix! Deleting two or more events doesn’t make the plugin freak out anymore (the bug fix). You can also customize how the onHover time is displayed, including not displaying it at all (just leave it blank). Because you can leave it blank, there is no default; but you can use and PHP “date()” format. I recommend “j M Y, G:i:s”. I also added a six month delay before the date on recurring events is reset…although as I’m writing this, I realize there’s a slight bug there, nothing critical though. I welcome any new ideas, just leave a comment down below!

03-13-2006 - http://dev.wp-plugins.org/browser/countdown-timer/tags/1.2/


NOTICE: Copyright format changed from MIT to GNU GPL as of version 1.1

Not a whole lot of major thing. Thanks to Benoit Kechid (http://www.marine-et-ben.info/) for catching a calculation and syntax error. There was a request for making things linkable, so you can now add a link an event. The time is also has a dashed underlined and if you roll over it with your mouse, the date and time of the event are displayed.

I don’t have anymore ideas for this plugin, so unless I you email me with something that you would like, there probably won’t be any more updates.

11-28-2005 - http://dev.wp-plugins.org/browser/countdown-timer/tags/1.2/


You can now set recurring dates, sort of. The plugin can currently handle things that happen on a given day of a given month every year (such as a birthday). The plugin will also now check for updates whenever you are in the admin panel. Download and copy to your plugins directory, then rename it to .php

10-05-2005 - http://dev.wp-plugins.org/browser/countdown-timer/tags/1.0/


Fixed a Warning message (thanks to cordney* for the heads up). Also changed a few things: If you have “Automatically delete ‘One Time Events’ on, only events that that do NOT have “Display ‘Time since’” will be deleted. Also, the file is now a PHPS file, not zip file. Download and copy to your plugins directory, then rename it to .php

09-26-2005 - http://dev.wp-plugins.org/browser/countdown-timer/tags/0.95/


This version adds the option to automatically delete One Time Events that have all ready occured. If you don’t choose to automatically delete the events, they will be displayed as “Time since” after the event occurs. Small issue I’m still working on: events are only erased when you update timer options.

09-23-2005 - http://dev.wp-plugins.org/browser/countdown-timer/tags/0.92/


This is a backend change. The dates.txt file has been replaced with an entry in the WordPress Database. Unfortantly, you’ll have to manually transfer your events into the new form. Once they are in the form, they are automatically sorted, with events ending soonest on the top.

07-23-2005 - http://dev.wp-plugins.org/browser/countdown-timer/tags/0.8/


Changed an internal function name reference due to a potential conflict with another plugin (Thanks Robert)

05-23-2005 - http://dev.wp-plugins.org/browser/countdown-timer/tags/0.71/


Added Admin menu. Allows user to update information via web-interface now.

05-20-2005 - http://dev.wp-plugins.org/browser/countdown-timer/tags/0.7/


Fixed small math error in cdt_format() on line 47.

05-16-2005 - http://dev.wp-plugins.org/browser/countdown-timer/tags/0.6.1/


Inital public release

05-15-2005 - http://dev.wp-plugins.org/browser/countdown-timer/tags/0.6/

Last modified 11 years ago Last modified on 02/28/07 17:24:34