[wp-trac] [WordPress Trac] #49294: If multiple posts has same date, get_previous_post() and get_next_post() returns only first/last of them
WordPress Trac
noreply at wordpress.org
Sun Jan 26 12:45:02 UTC 2020
#49294: If multiple posts has same date, get_previous_post() and get_next_post()
returns only first/last of them
----------------------------+-----------------------------
Reporter: oskarijarvelin | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
----------------------------+-----------------------------
get_previous_post() and get_next_post() both uses get_adjacent_post()
-function, which uses date for query. If query return multiple posts for
same date, function only returns first or last post depending on $previous
-parameter. As a result, if you have multiple posts for a same date,
get_previous_post() and get_next_post() functions does not work as meant
to.
Found one mention about this issue about a year earlier:
https://wordpress.stackexchange.com/questions/330276/get-next-post-and-
get-previous-post-return-wrong-posts
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49294>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list