[wp-trac] [WordPress Trac] #26937: get_adjacent_post() should use WP_Query rather than build its own SQL query

WordPress Trac noreply at wordpress.org
Fri Mar 14 13:49:05 UTC 2014


#26937: get_adjacent_post() should use WP_Query rather than build its own SQL query
-------------------------+-----------------------
 Reporter:  ethitter     |       Owner:  nacin
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  3.9
Component:  Query        |     Version:  3.7
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+-----------------------

Comment (by BinaryMoon):

 Replying to [comment:28 afercia]:
 > please correct me if I'm wrong
 > with 'ignore_sticky_posts' => true are you completely excluding sticky
 posts from posts navigation? when I revert back, I have my sticky posts in
 the post navigation and that make sense since if a theme makes use of
 prev/next links, you want to navigate through posts chronologically.

 The way it was (incorrectly) setup the next and previous links always
 pointed to the same post on every post because the sticky post was being
 pushed to the front of the que in both instances.

 The correct way would be to ignore the stickiness and just sort things
 chronologically. Sticky posts will still show, they just won't be at the
 front every time.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/26937#comment:29>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list