Make WordPress Core

Opened 15 years ago

Closed 8 years ago

Last modified 8 years ago

#9571 closed enhancement (fixed)

Filter to exclude categories from adjacent post links

Reported by: rmccue's profile rmccue Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch
Focuses: template Cc:


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 (4)

9571.diff (554 bytes) - added by rmccue 15 years ago.
9571.2.diff (841 bytes) - added by Japh 11 years ago.
Refreshed patch
9571.3.diff (781 bytes) - added by MikeHansenMe 9 years ago.
Refreshed plus docs
9571.4.diff (781 bytes) - added by MikeHansenMe 8 years ago.
Updated the docs

Download all attachments as: .zip

Change History (13)

15 years ago

#1 @Denis-de-Bernardy
15 years ago

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

#2 @Denis-de-Bernardy
15 years ago

  • Keywords tested commit added

commit, wontfix?

#3 @Denis-de-Bernardy
15 years ago

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

patch is b0rke

11 years ago

Refreshed patch

#4 @Japh
11 years ago

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

Added a refreshed patch for this.

#5 @nacin
10 years ago

  • Component changed from Template to Posts, Post Types
  • Focuses template added

9 years ago

Refreshed plus docs

#6 @MikeHansenMe
9 years ago

Added docs and refreshed.

8 years ago

Updated the docs

#7 @MikeHansenMe
8 years ago

9571.4.diff is a refresh of the previous patch and updates the docs.

#8 @wonderboymusic
8 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 34528:

Links: in get_adjacent_post(), add a "get_{$adjacent}_post_excluded_terms" filter.

Props rmccue, Japh, MikeHansenMe.
Fixes #9571.

#9 @wonderboymusic
8 years ago

  • Keywords needs-testing removed
  • Milestone changed from Future Release to 4.4
Note: See TracTickets for help on using tickets.