WordPress.org

Ready to get started?Download WordPress

Forums

Date not showing! (2 posts)

  1. aquanius
    Member
    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>
    <span class="day-wrapper">
    <span class="day"><?php the_date('j'); ?></span>
    </span>
    </h2>

    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:

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

    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

Tags

No tags yet.