• Resolved Chris Blackwell

    (@chrisblackwell)


    If I post something and then post again on the same day, the date from the first post always goes blank. See an example of my homepage right now – https://chrisblackwell.me/

    If I change the date of the second post, the day will come back, but only if they are different days. I’m just using this very basic function call:
    <?php the_date('d'); ?>

Viewing 1 replies (of 1 total)
  • Thread Starter Chris Blackwell

    (@chrisblackwell)

    Never mind. Fixed the problem. I should now this! <?php the_date('d'); ?> only works if there is a single post. If there is another post of the same day, you must use <?php the_time(); ?>. So the code that I should have used all along is:
    <?php the_time('j'); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Date disappears if post from same day.’ is closed to new replies.