WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Displaying 'days since first post' on each post (2 posts)

  1. newyorkgeek
    Member
    Posted 3 years ago #

    Hi all,

    For each post, rather than display the date it was posted, I'd like to display the number of days since the first post. I'm happy to hardcode in the variable for the first post, and the maths/php to calculate 'days since' is fine, but I can't figure out how to get the_time() (per post) as a variable, rather than simply printing it to screen.

    Any ideas?

  2. newyorkgeek
    Member
    Posted 3 years ago #

    Seems you can redirect echo to a buffer instead, here's a handy guide:

    http://bura-bura.com/blog/archives/2004/12/01/php-tip-redirecting-echo-output/

    *fixed*

Topic Closed

This topic has been closed to new replies.

About this Topic