• I changed the meta line in index.php to the following

    <div class=”meta”><?php the_date(‘M d’,”,”) ?> – <?php the_time()?> | <?php the_category() ?></div>

    now when loading the blog the date is only shown on the first post

    Jan 05 – 9:05 pm | Category1 Category2

    subsequent posts look like this….

    – 9:05 pm | Category1 Category2

    For some reason the date has disappeared. This happens in any category with more than one post.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jsquintz

    (@jsquintz)

    <?php the_date() ?>
    the date of the post. example: 03.07.01 (default is dd.mm.yy).
    the date is displayed only on new days. for example if you got 10 posts on the same day, the date for this day is displayed only once.
    And then in the notes below….
    Note about the_date(): if you want all your posts to bear the date, you’ll have to use the_time() instead, with a date format string. for example, to have all your posts show like “25.12.2001 @ 8:04:50 AM” you’ll have the_time(“d.m.Y @ g:i:s A”). you can also repeat this template tag 2 times with 2 different formats: the_time(“d.m.Y”) for the date, and then later the_time(“g:i:s A”) for the time of the day.

    To add to your followup note jsquintz, just replace

    <?php the_date("M d","","") ?> - <?php the_time()?>

    with

    <?php the_time("M d - g:i a")?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dates Disappearing’ is closed to new replies.