[wp-trac] [WordPress Trac] #19471: Support use of custom post types in category and tag archives

WordPress Trac noreply at wordpress.org
Tue May 12 23:04:45 UTC 2015


#19471: Support use of custom post types in category and tag archives
--------------------------+------------------------------
 Reporter:  chrisjean     |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Taxonomy      |     Version:  3.0
 Severity:  normal        |  Resolution:  maybelater
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------------
Changes (by johnbillion):

 * keywords:  has-patch => needs-patch
 * component:  Query => Taxonomy
 * milestone:   => Awaiting Review


Comment:

 Replying to [comment:38 mdgl]:
 > As it stands, if you do make use of the "standard" taxonomies in this
 way, nothing will happen because by default queries will never find any
 matching custom post types.  Why would the developer want that behaviour
 (i.e. associate the taxonomy with a post type but not have any of those
 post types returned on a query for that taxonomy)?
 Incidentally, I'm working on a client project currently which requires
 exactly this. Several custom post types which use categories and tags but
 which, by default, do not show up on the categories and tags archive
 pages. A change like this would break the behaviour of the site.

 Replying to [comment:39 jorbin]:
 > I would look at adding a third argument to
 register_taxonomy_for_object_type that takes an array and includes a
 paramater such as "include_object_in_default_taxonomy_archive" that could
 be used to trigger to the default taxonomies that additional objects
 should be included in the archive queries.
 This is probably the best idea. It could be added as an argument in
 `register_taxonomy()` too.

 If someone wants to patch this, please re-open.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/19471#comment:40>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list