WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] the_date() sometimes doesn’t display.

[Resolved] the_date() sometimes doesn’t display.

Viewing 10 replies - 1 through 10 (of 10 total)
  • I bet you didn’t read the Special Note under its description 🙂
    http://codex.wordpress.org/Template_Tags/the_date

    The date only occurs once per day. ie for 2 posts on the same day one will be without the date. It is a WP function. To get what you want replace with the php function get time.

    Moshu, I’m thoroughly busted! I did indeed not read the special note. Though I know I visited the codex page, so it was a case of highly-selective reading on my part, skillfuly managing to avoid the largest and most bold areas of the page.

    I’m too visually nimble for my own good.

    Thanks for pointing that out guys… I feel pretty silly.

    Cheers 😉

    Dang moshu 🙂

    Oh Root, I love you too, even if I didn’t mention you by name 🙂

    You’ll always have a special place in my access logs.

    Blimey 🙂

    The date only occurs once per day. ie for 2 posts on the same day one will be without the date. It is a WP function. To get what you want replace with the php function get time.

    ‘Scuse me butting in here, but I’ve been looking for a way to display the date prominently once and then all the posts for that day. Will this allow me to do that?

    Can anyone suggest a Theme that does this — display the date once at the top of all the posts for that date’

    I’m puzzled, because if it is the first — that is the earliest — post on the day that gets the_date, how do you display it with the latest post for that day?

    Thanks

    Don’t be puzzled – just read the documentation linked above + the links, references from there.

    (and take a look at the Classic theme: it displays the date only once per day)

    Thank you moshu. Got it working fine, mostly.

    You can also use this:

    unset($previousday);the_date('','','');

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] the_date() sometimes doesn’t display.’ is closed to new replies.
Skip to toolbar