[resolved] human_time_diff for 'years ago'? (3 posts)

  1. streetrose
    Posted 4 years ago #

    I'm setting up a blog where I'm archiving all my posts from different blogs from the the past years. It's basically an archive blog. Now, I'm looking for a way to make the timestamp show something like '5 years ago'. I found out about human_time_diff but all the searches only lead me to hours, days, months ago. Is there a way to make it show years ago as well?

  2. I was looking into it myself when I stumbled upon this post:


    It's a really neat solution and he's documented it really well.

    Incorporate that into your theme's functions.php file and anywhere you put the_time() you'll get human readable in seconds, minutes, hours, days, months, and years.

  3. streetrose
    Posted 4 years ago #

    @Jan Dembowski

    Thank you very much. That's the one for me. :)

Topic Closed

This topic has been closed to new replies.

About this Topic