Solution
Put the code bellow in your theme’s functions.php file.
function time_ago( $type = 'post' ) {
$d = 'comment' == $type ? 'get_comment_time' : 'get_post_time';
return human_time_diff($d('U'), current_time('timestamp')) . " " . __('ago');
}
To use it simply echo it like in the code bellow.
echo time_ago();
Thanks to upThemes for this little snippet.
Our WordPress themes
We have a few WordPress themes that we would like you to take a look at if you want.
check out the portfolio











I was looking for something as simple and easy to impliment. Thanks for this. Now I just need to see how I can impliment this hack with Thesis theme.
Try this one instead: http://codex.wordpress.org/Function_Reference/human_time_diff
It’s already built into WordPress.