[wp-trac] [WordPress Trac] #16233: Custom taxonomy archive returns 404 when it contains only custom post types

WordPress Trac wp-trac at lists.automattic.com
Thu Jan 27 04:12:57 UTC 2011


#16233: Custom taxonomy archive returns 404 when it contains only custom post types
------------------------------------+-----------------------------
 Reporter:  sillybean               |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Future Release
Component:  Taxonomy                |     Version:  3.1
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback 3.2-early  |
------------------------------------+-----------------------------

Comment (by WraithKenny):

 Had a similar issue... If you just need it working, I think the following
 should work:
 {{{
 add_action( 'pre_get_posts', 'on_pre_get_posts' );
 function on_pre_get_posts() {
     global $wp_query;
     if ( is_tax( 'college' ) )
         $wp_query->set(  'post_type', array( 'any' ) );
 }
 }}}

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


More information about the wp-trac mailing list