Forums

Date not showing up (3 posts)

  1. alexruimy
    Member
    Posted 4 years ago #

    I have multiple posts in my WP blog and there's a line below the title and above the content for each entry that reads "Posted on (insert date) by (insert user)"

    For the first post, the date function is working correctly. But for subsequent posts (all of which I have made today), the date does not appear. I know my template tags are correct.

    A snip from my loop code looks like this:

    <TR><TD CLASS="ContentSubPadding" HEIGHT="20" VALIGN="Top"><P CLASS="ContentAuxLight">Posted <SPAN CLASS="ContentAuxDark"><?php the_date(); ?></SPAN> by <SPAN CLASS="ContentAuxGreen">
    <?php the_author_email() ?></SPAN></P></TD></TR>

    Am I doing something wrong? Is there a way to make the date appear more than once?

  2. Kafkaesqui
    Moderator
    Posted 4 years ago #

    From the documentation on the_date():
    http://codex.wordpress.org/Template_Tags/the_date

    "When there are multiple posts published on the same date on a page, the tag will only display the date the first time it's called."

    For displaying the date multiple times on the same date, use a date format string with the_time():

    http://codex.wordpress.org/Template_Tags/the_time

    See the examples there for how to do that.

  3. alexruimy
    Member
    Posted 4 years ago #

    Yeah, I realized that like the second I posted it. I have a disease called "stupid."

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic