Ready to get started?Download WordPress


Date not showing! (2 posts)

  1. aquanius
    Posted 8 years ago #

    I've been messing around with wordpress, and making my own theme, and I use 3 php the_date functions, so I can style the date to my liking, but after putting:

    <h2 class="date">
    <span class="wrapper">
    <span class="weekday"><?php the_date('D'); ?></span>
    <span class="month"><?php the_date('M'); ?></span>
    <span class="day-wrapper">
    <span class="day"><?php the_date('j'); ?></span>

    in as my code, only the first php the_date function works, the rest just show up as empty span tags when the source is viewed (on the web, not in the dashboard).

    Can anyone help?

  2. Reading the documentation is a good idea:


    Displays or returns the date of a post or a set of posts if they were all published on the same day. 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.

    This tag must be used within The Loop.

    Note: To display the date for posts individually, use the_time() instead with a date-specific format string.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.