WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Only the most recent post from any given day has a date. HELP!! (3 posts)

  1. schmackLab
    Member
    Posted 4 years ago #

    I have just launched a new website but when I publish more than one post a day only the most recent post has a date.

    EXAMPLE:

    March 18 3pm (has date)
    March 18 2pm (no date)
    March 18 1pm (no date)

    March 17 2pm (has date)
    March 17 2pm (no date)

    March 16 2pm (has date)
    March 16 2pm (no date)

    Does anyone know what could be causing this?

    Thanks for your help!

  2. MichaelH
    Member
    Posted 4 years ago #

    Review the template tag, the_date().

    It says:

    SPECIAL NOTE: When there are multiple posts on a page published under the SAME DAY, the_date() only displays the date for the first post (that is, the first instance of the_date()). To repeat the date for posts published under the same day, you should use the Template Tag the_time() with a date-specific format string.

    Related:
    the_time()
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy

  3. schmackLab
    Member
    Posted 4 years ago #

    Thanks, works like a charm!

Topic Closed

This topic has been closed to new replies.

About this Topic