WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#27461 closed defect (bug) (duplicate)

previous_post and next_post links loop on sticky post

Reported by: janhenckens Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9
Component: Query Keywords:
Focuses: Cc:

Description

I stumbled across a weird issue in a theme I'm building so I decided to try it on a clean install (running trunk) with twentyfourteen but the problem appears there as wel. Here goes:

When you have a sticky post, the previous_post and next_post links for the posts before and after that sticky post, both point to the sticky entry.

Example:

Post 2 <= sticky post, posted after post 1 and before post 3
Post 3 <= posted after post 1 and 2, non sticky
Post 1 <= posted before post 2 and 3, non sticky

Nav links for post 2: Post 1 < > Post 3
Nav links for post 3: Post 2 < > Post 2
Nav links for post 1: Post 2 < > Post 2
(see screenshot in attachment)

Tested in twentythirteen and twentytwelve....

Is this a bug or am I just expecting things to work differently?

Attachments (1)

Screen Shot 2014-03-19 at 22.28.03.png (43.3 KB) - added by janhenckens 4 years ago.
Post showing incorrect previous and next links

Download all attachments as: .zip

Change History (2)

@janhenckens
4 years ago

Post showing incorrect previous and next links

#1 @obenland
4 years ago

  • Component changed from General to Query
  • Focuses template removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Thanks for the report! The feature is currently under development over at #26937.
I submitted a patch there an hour ago but it seems there is already a patch addressing it. :)

Note: See TracTickets for help on using tickets.