Opened 4 years ago
Last modified 20 months ago
#8532 new defect (bug)
the_date() doesn't function as intended
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Template | Version: | |
| Severity: | normal | Keywords: | needs-patch gsoc |
| Cc: |
Description
If my memory serves the idea behind the_date was that it would echo out the date, but only if it was different than the previous item it echoed out in the loop, which would be handy for doing things like day headers in index templates or month headers in archives.
At some point this seems to have been lost, I think because some variable names changed.
This restores the_date to its original behaviour.
Attachments (2)
Change History (12)
markjaquith — 4 years ago
comment:1
markjaquith — 4 years ago
This note at http://codex.wordpress.org/Template_Tags/the_date is the premise we've used for a number of years in answering questions in the Forums:
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.
New days only is what my memory tells me this did.
And is how I have always explained it to people.
- Keywords has-patch added
- Keywords needs-patch added; has-patch removed
- Milestone changed from 2.8 to Future Release
broken patch
- Milestone changed from Future Release to 2.8.1
- Milestone changed from 2.9 to Future Release
Moving to Future until this has a new patch.
comment:9
wojtek.szkutnik — 3 years ago
- Keywords gsoc added
comment:10
hakre — 20 months ago
X-Ref: #13493

Refreshed the patch. FWIW, I'm not sure this was ever the way it functioned. I think it's always functioned that it'd echo out only for new days, not a change in output. I do, however, think that what you've proposed is useful.