WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#29667 closed defect (bug) (duplicate)

next_post_link & previous_post_link Category exclude broken *UPDATE*

Reported by: gabrieldiggs Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0
Component: General Keywords:
Focuses: Cc:

Description

(I was unable to update my previous ticket so I created a new one including the original post)

Hello,
As of WordPress 4.0 my custom next_post_link & previous_post_link is broken. My code is as follows:

<?php next_post_link( '&laquo; %link', '%title', TRUE, '115' ); ?> |

<?php previous_post_link( '%link &raquo;', '%title', TRUE, '115' ); ?>

WordPress now ignores the excluded category (115) part of the code and shows all post regardless of category when clicking the next or previous post links. Everything was working before the upgrade to 4.0
Attachments (0)

*UPDATE*

On a hunch I downloaded WordPress version 3.9.2 from the archive and replaced the link-template.php from 4.0 with the version from 3.9.2. Sure enough everything is back to normal on my site so the problem with category exclusion is definitely due to changes made in link-template.php from WordPress 3.9.2 to 4.0. I compared both files using File Merge on Mac OS X and there are multiple differences between the two files. Should I just keep the version from 3.9.2 or should I wait for a fix to WordPress version 4.0?

Change History (2)

#1 follow-up: @ocean90
6 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #29663.

You can use the comment from on the other ticket.

Version 0, edited 6 years ago by ocean90 (next)

#2 in reply to: ↑ 1 @gabrieldiggs
6 years ago

Replying to ocean90:

Duplicate of #29663.

You can use the comment form on the other ticket.

Hi it doesn't work. I get the "Sorry, can not save your changes. This ticket has been modified by someone else since you started " warning.

UPDATE

Thanks it's working now.

Last edited 6 years ago by gabrieldiggs (previous) (diff)
Note: See TracTickets for help on using tickets.