Make WordPress Core

Opened 6 years ago

Last modified 2 years ago

#43689 new defect (bug)

next_post_link()/previous_post_link() broken for custom post types in same custom taxonomy term

Reported by: blackbam's profile Blackbam Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.5
Component: Posts, Post Types Keywords: reporter-feedback
Focuses: Cc:


The link to the next post is being displayed however the third parameter $in_same_term seems to be completely ignored even though parameter $taxonomy is correct (

E.g. you are on singular pages of a custom post type "Job". You want to have the next post link of "Jobs" which are in the same "Job Group" (a custom taxonomy) e.g. "Developer". However next post link will deliver a next Job which is in the "Job Group" "Graphic Designer" even though $in_same_term was set to true.

Attachments (1)

43689.test.diff (1.7 KB) - added by soulseekah 6 years ago.
test scenario

Download all attachments as: .zip

Change History (3)

6 years ago

test scenario

#1 @soulseekah
6 years ago

  • Keywords reporter-feedback added

Hey there :)

43689.test.diff is a test scenario closely resembling your description, I think. The test passes with flying colors. i.e. worksforme

What am I missing?

#2 @SergeyBiryukov
6 years ago

  • Component changed from General to Posts, Post Types
Note: See TracTickets for help on using tickets.