Title: U.S. Debt Clock Widget
Author: Chris Hardie
Published: <strong>November 2, 2014</strong>
Last modified: August 17, 2024

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/us-debt-clock-widget/assets/icon-256x256.png?rev=3137149)

# U.S. Debt Clock Widget

 By [Chris Hardie](https://profiles.wordpress.org/chrishardie/)

[Download](https://downloads.wordpress.org/plugin/us-debt-clock-widget.zip)

 * [Details](https://scn.wordpress.org/plugins/us-debt-clock-widget/#description)
 * [Reviews](https://scn.wordpress.org/plugins/us-debt-clock-widget/#reviews)
 *  [Installation](https://scn.wordpress.org/plugins/us-debt-clock-widget/#installation)
 * [Development](https://scn.wordpress.org/plugins/us-debt-clock-widget/#developers)

 [Support](https://wordpress.org/support/plugin/us-debt-clock-widget/)

## Description

This plugin creates a widget displaying the most recently available amount of the
U.S. National Debt. Data is retrieved from treasurydirect.gov and a source link 
can optionally be displayed.

Want to help make this plugin better? [Pull requests are welcome](https://github.com/ChrisHardie/us-debt-clock-widget).

## Screenshots

[⌊The widget front-end display⌉⌊The widget front-end display⌉[

The widget front-end display

[⌊The widget options configuration display⌉⌊The widget options configuration display⌉[

The widget options configuration display

## Installation

 1. Upload the `us-debt-clock-widget` folder to the `/wp-content/plugins/` directory
 2. Activate the U.S. Debt Clock Widget plugin through the `Plugins` menu in the WordPress
    dashboard
 3. Add the widget to an available widget area and configure the display options

## Reviews

![](https://secure.gravatar.com/avatar/55cc2ef441581bc830b6780bdc0ba8374bde93dd26cfef7e1d659f2ad5562632?
s=60&d=retro&r=g)

### 󠀁[Great Job, Suggestion](https://wordpress.org/support/topic/great-job-suggestion/)󠁿

 [hawkeeye](https://profiles.wordpress.org/hawkeeye/) November 18, 2024 6 replies

This is both useful and easy to configure. My only suggestion would be to allow 
more formatting so that you can match or deviate from your website default.

![](https://secure.gravatar.com/avatar/0fa35ae2887fbeb6bd243399f083899909a64117c206296e57aba11a50594f0c?
s=60&d=retro&r=g)

### 󠀁[Unique plugin](https://wordpress.org/support/topic/unique-plugin-11/)󠁿

 [scottistrand](https://profiles.wordpress.org/scottistrand/) September 12, 2021

Great plugin for my gold website.. Thanks!

 [ Read all 3 reviews ](https://wordpress.org/support/plugin/us-debt-clock-widget/reviews/)

## Contributors & Developers

“U.S. Debt Clock Widget” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Chris Hardie ](https://profiles.wordpress.org/chrishardie/)

[Translate “U.S. Debt Clock Widget” into your language.](https://translate.wordpress.org/projects/wp-plugins/us-debt-clock-widget)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/us-debt-clock-widget/),
check out the [SVN repository](https://plugins.svn.wordpress.org/us-debt-clock-widget/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/us-debt-clock-widget/)
by [RSS](https://plugins.trac.wordpress.org/log/us-debt-clock-widget/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.6

 * Fix: use newer Treasury debt feed and info URLs, as they did not redirect the
   old ones.

#### 1.5

 * Fix: catch undefined variable scenario
 * Improvement: additional code standards and formatting updates

#### 1.4

 * Fix: change data source from treasury.io to treasurydirect.gov
 * Improvement: code style and formatting

#### 1.3

 * Fix: unfortunate math error that had debt displaying as billions, not trillions,
   h/t Scott Cooper

#### 1.2

 * Fix: error in get_debt logic that was preventing successful data from being returned
 * Fix: update widget registration to work with recent versions of WordPress
 * Improvement: Update code formatting and escaping to better adhere to WordPress
   coding standards
 * Improvement: Delete transient when plugin is deactivated

#### 1.1

 * Improvement: Handle invalid data from treasury.io more gracefully

#### 1.0

 * Initial release

## Meta

 *  Version **1.6**
 *  Last updated **2 years ago**
 *  Active installations **100+**
 *  WordPress version ** 2.8 or higher **
 *  Tested up to **6.6.5**
 *  Language
 * [English (US)](https://wordpress.org/plugins/us-debt-clock-widget/)
 * Tags
 * [economy](https://scn.wordpress.org/plugins/tags/economy/)[finance](https://scn.wordpress.org/plugins/tags/finance/)
   [government](https://scn.wordpress.org/plugins/tags/government/)[money](https://scn.wordpress.org/plugins/tags/money/)
   [widgets](https://scn.wordpress.org/plugins/tags/widgets/)
 *  [Advanced View](https://scn.wordpress.org/plugins/us-debt-clock-widget/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  3 5-star reviews     ](https://wordpress.org/support/plugin/us-debt-clock-widget/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/us-debt-clock-widget/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/us-debt-clock-widget/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/us-debt-clock-widget/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/us-debt-clock-widget/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/us-debt-clock-widget/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/us-debt-clock-widget/reviews/)

## Contributors

 *   [ Chris Hardie ](https://profiles.wordpress.org/chrishardie/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/us-debt-clock-widget/)