[wp-trac] [WordPress Trac] #55751: get_the_posts_navigation() is using incorrect functions to output navigation links

WordPress Trac noreply at wordpress.org
Tue May 17 18:40:49 UTC 2022


#55751: get_the_posts_navigation() is using incorrect functions to output
navigation links
-------------------------------+------------------------------
 Reporter:  jongycastillo      |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  5.9.3
 Severity:  normal             |  Resolution:
 Keywords:  has-patch          |     Focuses:
-------------------------------+------------------------------

Comment (by joyously):

 I think it's very confusing, but there are two sets of previous and next
 being used in this code.
 One is the previous and next page of results referred to by the $paged
 variable.
 The other is the previous and next posts regarding the date.

 The posts are shown in date descending order, so prev_text defaults to
 'Older Posts'. To get to older posts, you have to add 1 to the $paged
 variable, which is done by the `get_next_posts_link` path of functions.
 And vice versa for next.

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


More information about the wp-trac mailing list