I am currently using the following function in my footer

<?php the_time( 'Y' ); ?>

But the footer keeps showing 2011, instead of 2013.

So where does this time stamp get called from exactly?

| improve this question | | | | |
  • 1
    That function is for pulling time data related to posts, if you want the current year you should be looking toward PHPs native date() function. – t31os May 20 '13 at 17:52

the_time() is for outputting the time at which a post was written, and gets this value from the global $post.

I'm guessing you just want php's date()?

| improve this answer | | | | |
  • 2
    If you were using any sort of non-english language pack, or that was a possibility, it might be better to just always use date_i18n() instead, to ensure proper translations. For this particular Q it doesn't matter, but it's a good habit to get into. – Otto May 20 '13 at 21:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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