the_time() outputting 2010? (3 posts)

  1. gotmedia
    Posted 5 years ago #

    Hi there,

    I've been doing the php:

    <?php the_time(); ?> and everytime I do it, it outputs "2010" as the year. Clearly, we're not in 2010 anymore. Why is this doing this? Anyway to fix it? I have the loop started, too.

    - Steph

  2. Michael
    Forum Moderator
    Posted 5 years ago #

    the_time() outputs the publish time of a post; if not used in the loop, the output can be arbitrary.

    if you want to output the current time, look into:
    echo date('Y');


  3. gotmedia
    Posted 5 years ago #

    Ah, still, that's weird! I'll use the PHP output from now on, thanks :)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.