[wp-trac] [WordPress Trac] #8107: get_next_post, get_previous_post do not work for posts posted within same second
WordPress Trac
noreply at wordpress.org
Mon Mar 10 08:15:37 UTC 2014
#8107: get_next_post, get_previous_post do not work for posts posted within same
second
----------------------------------------+-----------------------------
Reporter: whoismanu | Owner:
Type: defect (bug) | Status: new
Priority: low | Milestone: Future Release
Component: Posts, Post Types | Version: 2.7
Severity: minor | Resolution:
Keywords: needs-testing dev-feedback | Focuses: template
----------------------------------------+-----------------------------
Comment (by SergeyBiryukov):
Replying to [comment:14 billerickson]:
> I played around with it a bit and couldn't come up with a single WP
Query that queried either posts ordered by date with different published
dates OR posts ordered by ID with the same published date. Doing 'orderby'
=> 'date ID' didn't do it.
`'order' => 'ASC', 'orderby' => 'date ID'` with a subsequent
`array_reverse()` would probably work, see comment:14:ticket:26042 and
[attachment:26042.3.diff:ticket:26042].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/8107#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list