Forums

[resolved] Different Date display (3 posts)

  1. rouss
    Member
    Posted 3 years ago #

    Hello,

    I've dug in the Codex, but didn't figure out one simple thing. Say, I write a couple of posts per day and I wouldn't like to display post date each time. Instead of this, I would like to display 1 header with a date and then list of the posts i've written that day. The simple example is http://daringfireball.net, it uses the same technique. It would be much better if WordPress didn't show the date of the posts unless there's newer posts, again, see DF for example.

    Thanks in advance, hope you got me right.

    — Rouss.

  2. Xamataca
    Member
    Posted 3 years ago #

    If I understand you well this is the normal bahaviour of template tag the_date():

    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.

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

    and doing a search at codex:
    http://codex.wordpress.org/User:MCincubus/group_by_day
    Don't know if the code in that page works but you can try :-)

  3. rouss
    Member
    Posted 3 years ago #

    @Xamatace, thanks a lot for your help. I appreciate.

Topic Closed

This topic has been closed to new replies.

About this Topic