[wp-trac] [WordPress Trac] #12659: Hierarchical Taxonomy URL's do not include parent terms

WordPress Trac wp-trac at lists.automattic.com
Fri Oct 22 23:31:35 UTC 2010


#12659: Hierarchical Taxonomy URL's do not include parent terms
-------------------------+--------------------------------------------------
 Reporter:  dd32         |       Owner:  dd32       
     Type:  enhancement  |      Status:  assigned   
 Priority:  normal       |   Milestone:  3.1        
Component:  Taxonomy     |     Version:  3.0        
 Severity:  normal       |    Keywords:  needs-patch
-------------------------+--------------------------------------------------

Comment(by dd32):

 > [15825] introduces this notice when viewing a category page:

 That code was there to prevent notices on custom taxonomy pages, Since it
 was inserted, It seems another commit has caused {{{$q['taxonomy']}}} to
 be unset.

 If code such as this is used on a generic template:
 {{{
 $link =  get_term_link(get_query_var('term'), get_query_var('taxonomy'));
 }}}

 that'll cause one or the other not to be set.

 {{{wp_title()}}} also uses it:
 {{{
         // If there's a taxonomy
         if ( is_tax() ) {
                 $tax = get_taxonomy( get_query_var('taxonomy') );
                 $title = single_term_title( $tax->labels->name . $t_sep,
 false );
         }
 }}}

 While it may not be the "best" way of getting the data, That's how it's
 currently done in many themes that I've seen. Supporting $term and
 $taxonomy for backwards compatibility has to happen, Even if it's only the
 first taxonomy/term which is being queried on a multi-taxonomy query.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12659#comment:25>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list