WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 3 months ago

#9571 new enhancement

Filter to exclude categories from adjacent post links

Reported by: rmccue Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch needs-testing
Focuses: template Cc:

Description

I'm currently attempting to exclude a certain category from everywhere possible. While there are filters to exclude it from everywhere else (as far as I can see, anyway), there is not a filter to exclude it from next/previous post links.

The following patch adds a hook called 'get_{$adjacent}_post_excluded' to filter the excluded categories string.

Attachments (2)

9571.diff (554 bytes) - added by rmccue 5 years ago.
9571.2.diff (841 bytes) - added by Japh 18 months ago.
Refreshed patch

Download all attachments as: .zip

Change History (7)

rmccue5 years ago

comment:1 Denis-de-Bernardy5 years ago

  • Component changed from General to Template
  • Keywords has-patch added
  • Milestone changed from Unassigned to 2.8

comment:2 Denis-de-Bernardy5 years ago

  • Keywords tested commit added

commit, wontfix?

comment:3 Denis-de-Bernardy5 years ago

  • Keywords needs-patch added; has-patch tested commit removed
  • Milestone changed from 2.8 to Future Release

patch is b0rke

Japh18 months ago

Refreshed patch

comment:4 Japh18 months ago

  • Cc japh@… added
  • Keywords has-patch needs-testing added; needs-patch removed

Added a refreshed patch for this.

comment:5 nacin3 months ago

  • Component changed from Template to Posts, Post Types
  • Focuses template added
Note: See TracTickets for help on using tickets.