[wp-trac] [WordPress Trac] #21945: wp_list_categories feed links unaware of custom type

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 20 19:40:28 UTC 2012


#21945: wp_list_categories feed links unaware of custom type
-----------------------------+--------------------------
 Reporter:  belg4mit         |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  General
  Version:  3.4.1            |   Severity:  normal
 Keywords:                   |
-----------------------------+--------------------------
 wp_list_categories accepts a taxonomy argument to specify a custom
 taxonomy, and correctly lists item of said taxonomy. However the feed
 links produced lack the necessary ?post_type= for the corresponding custom
 post types that may be used with a category.

 Ideally the function could auto-detect stuff and do the right thing
 automatically. Less ideally it might accept another argument to define the
 post types used in the category. At a minimum, this should be documented,
 and a work-around such as the following included:


 {{{
 function wp_list_cat_custom_feed($txt){
   return preg_replace('/\/feed\/?/', '/feed/?post_type=foo', $txt);
 }
 add_filter('wp_list_categories','wp_list_cat_custom_feed');
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21945>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list