[wp-trac] [WordPress Trac] #12730: Custom post types not appearing on core taxonomy pages

WordPress Trac wp-trac at lists.automattic.com
Sat Mar 27 09:04:55 UTC 2010


#12730: Custom post types not appearing on core taxonomy pages
--------------------------+-------------------------------------------------
 Reporter:  aizatto       |       Owner:  filosofo                  
     Type:  defect (bug)  |      Status:  new                       
 Priority:  normal        |   Milestone:  Unassigned                
Component:  Taxonomy      |     Version:  3.0                       
 Severity:  normal        |    Keywords:  custom post type, taxonomy
--------------------------+-------------------------------------------------
 I'm running into a few problems with using custom post types using a core
 taxonomy (post_tag). Where visiting the tag page will not display the
 custom post type.

 I have created a custom post type with:

 {{{
 register_post_type('ticket',
         array(
                 'label'   => __('Ticket'),
                 'public'  => true,
                 'show_ui' => true,
                 'supports' => array('thumbnail', 'excerpt', 'trackbacks',
 'custom-fields', 'comments', 'revisions', 'title', 'editor')
         )
 );
 }}}

 then I registered the post_tag taxonomy to it

 {{{
 register_taxonomy_for_object_type('post_tag', 'ticket');
 }}}

 I created a Ticket, and tagged it (lets say with the tag "lion"). I tried
 visiting the page for the tag ie http://example.com/?tag=lion but it does
 not show up.

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


More information about the wp-trac mailing list