Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#27461 closed defect (bug) (duplicate)

previous_post and next_post links loop on sticky post

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

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 12 years ago.
Post showing incorrect previous and next links

Download all attachments as: .zip

Change History (2)

@janhenckens
12 years ago

Post showing incorrect previous and next links

#1 @obenland
12 years ago

  • Component GeneralQuery
  • Focuses template removed
  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

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.