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.

A While Ago


Show timestamp for a post or page using a relative description (e.g. “Hours ago”, “5 days ago”). The strings can be be changed easily for translations, and custom text can be prepended or appended to the timestamp.

The rules for the descriptions are (along with the default strings):

  • Within the last 60 minutes: “Moments ago”
  • Within the last 8 hours: “Hours ago”
  • Today: “Today”
  • Yesterday: “Yesterday”
  • 3-6 days ago: “4 days ago”
  • 1-8 weeks ago: “5 weeks ago”
  • 2-11 months ago: “7 months ago”
  • 1-4 years ago: “2 years 5 months ago”
  • 4 or more years ago: “4 years ago”


  1. Download the plugin.
  2. Unzip the contents of the downloaded file to the /wp-content/plugins/ directory of your WordPress installation.
  3. Log in to your WordPress dashboard and activate the wp_days_ago plugin that should now be visible in the list.
  4. You can now insert <? wp_awhileago(); ?> anywhere in The Loop in your WordPress theme.


<?php wp_awhileago( $prepend, $append, $descriptions); ?>


(string) (optional) This text will be prepended to the plugin’s default output. Default value is "" (empty string).

(string) (optional) This text will be appended to the plugin’s default output. Default value is "" (empty string).

(array) (optional) This array allows you to change the descriptive strings displayed by the plugin. The default value is array: “Moments ago”, “Hours ago”, “Today”, “Yesterday”, “days”, “week”, “weeks”, “month”, “months”, “year”, “years”, “ago”, “At some point in time”.

Contributors & Developers

“A While Ago” is open source software. The following people have contributed to this plugin.


Translate “A While Ago” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Initial version.