Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#37424 closed feature request (worksforme)

Add argument to register_taxonomy to specify which post type(s) show up on Tax archive

Reported by: sc0ttkclark's profile sc0ttkclark Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Query Keywords:
Focuses: Cc:

Description

Right now, taxonomy archives only show the default post post type in their archives. However, it would be greatly useful during register_taxonomy() to specify exactly which post type(s) should appear under the associated taxonomy archive.

So this would touch register_taxonomy() to set the argument, and WP_Query to make use of the argument when setting the default post type for the query to use (if one has not been specified).

Attachments (1)

37424.patch (2.5 KB) - added by PieWP 9 years ago.
Patch script

Download all attachments as: .zip

Change History (5)

#1 @johnbillion
9 years ago

  • Keywords needs-patch added
  • Type changed from enhancement to feature request

#2 @PieWP
9 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

Hey sc0ttkclark great suggestion, I sometimes encounter the same issue.
Attached a patch script

@PieWP
9 years ago

Patch script

#3 @sc0ttkclark
9 years ago

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

I'm sorry, I was mistaken in my initial creation of this ticket. This only applies to custom post types associated with the Category and Post Tag taxonomies. I'll have to open a new one, as (custom) taxonomies already have this functionality based on associated objects.

#4 @sc0ttkclark
9 years ago

  • Keywords has-patch needs-testing removed
Note: See TracTickets for help on using tickets.