WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want display date based on how much time has passed since, i. e. Posted 12 minutes ago

share|improve this question
up vote 6 down vote accepted

This is quite simple: just replace the get_the_date() or the_date() with

echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ago';
share|improve this answer
+1 for sharing what you learned. :) Do not use this function in a theme or plugin you want to distribute internationally. Correct translation is almost impossible. See also ticket #9272 for more problems. And you don’t need the second parameter in your example. – toscho Jun 21 '12 at 9:08
Indeed, i18n in dates is a terribly issue. – Diana Jun 21 '12 at 17:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.