[wp-trac] [WordPress Trac] #12719: Custom taxonomy with query_var set, gets taxonomy query_var appended anyway

WordPress Trac wp-trac at lists.automattic.com
Sat Mar 27 06:50:57 UTC 2010


#12719: Custom taxonomy with query_var set, gets taxonomy query_var appended anyway
--------------------------+-------------------------------------------------
 Reporter:  Silkjaer      |       Owner:  dd32             
     Type:  defect (bug)  |      Status:  accepted         
 Priority:  normal        |   Milestone:  3.0              
Component:  Query         |     Version:  3.0              
 Severity:  normal        |    Keywords:  reporter-feedback
--------------------------+-------------------------------------------------

Comment(by Silkjaer):

 It happens as you describe it - no redirection, just a change of the
 internal query vars. But only if i add "tax=term" in the URL and not in a
 query_posts in the theme/plugin.

 I made a quick fix by unsetting $wp_query->query['taxonomy'] and
 $wp_query->query['term'], then running query_posts again.

 My register_taxonomy()'s:

 {{{
 register_taxonomy(
                 'genre',
                 array(
                         'udgivelser',
                         'koncerter',
                         'kunstnere'
                 ),
                         array(
                                 'hierarchical' => false,
                                 'label' => __('Tag: Genre'),
                                 'query_var' => 'genre',
                                 'rewrite' => false
                 )
         );

         register_taxonomy(
                 'land',
                 'kunstnere',
                         array(
                                 'hierarchical' => false,
                                 'label' => __('Tag: Land'),
                                 'query_var' => 'land',
                                 'rewrite' => false
                 )
         );
 }}}

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


More information about the wp-trac mailing list