• thmz

    (@thmz)


    Hi all.
    I often write several posts in one day, and it would be nice if the date was written under every post, not just the latest that day.

    I use the code <?php the_date() ?> at the bottom of my post …

    The whole code for the posts look like this:

    <div class="post" id="post-<?php the_ID(); ?>">
    <div class="rubrik"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>

    <div class="storycontent">
    <?php the_content(__('(more...)')); ?>
    </div>

    <span class="meta">Skrivet <?php the_date() ?> kl. <?php the_time() ?></span>

Viewing 2 replies - 1 through 2 (of 2 total)
  • maerk

    (@maerk)

    For some reason, only the_time works over and over again. Try passing the data you want as arguments of the_time.

    php.net/date for all the different time variables.

    For example, I use

    <?php the_time('l'); echo " &bull; ";
    the_time('F jS, Y'); echo " &bull; ";
    the_time('g:i a'); ?>

    Which turns into:

    Tuesday • May 9th, 2006 • 8:10 am

    moshu

    (@moshu)

    I use the code <?php the_date() ?> at the bottom of my post …

    Replace it with the_time – and read about them in the Codex 🙂
    http://codex.ww.wp.xz.cn/Template_Tags/the_date
    Attention should be paid to the SPECIAL NOTE!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Display date on every post?’ is closed to new replies.