[wp-trac] [WordPress Trac] #13258: wp_dropdown_categories() uses $term->id instead of $term->name for taxonomies that are not categories

WordPress Trac wp-trac at lists.automattic.com
Wed May 5 05:41:44 UTC 2010


#13258: wp_dropdown_categories() uses $term->id instead of $term->name for
taxonomies that are not categories
--------------------------+-------------------------------------------------
 Reporter:  mfields       |       Owner:                                                 
     Type:  defect (bug)  |      Status:  new                                            
 Priority:  normal        |   Milestone:  3.0                                            
Component:  Taxonomy      |     Version:  3.0                                            
 Severity:  normal        |    Keywords:  wp_dropdown_categories, tag, taxonomy, category
--------------------------+-------------------------------------------------
 I was excited to discover that wp_dropdown_categories() had been extended
 to support custom taxonomies but when I tried to implement it, the
 navigation failed because it always uses the $term->ID in the value
 attribute of the option tag for each term.

 {{{
 <option class="level-0" value="13">A Category</option>
 }}}

 This makes sense because WordPress category requests uses the term id:
 /?cat=13

 But in the case of tags, we get this code:

 {{{
 <option class="level-0" value="3">My Tag</option>
 }}}

 which pulls a 404 when you request: /?tag=3

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


More information about the wp-trac mailing list