[wp-trac] [WordPress Trac] #14004: Custom columns for admin menu not working for custom post type with hierarchy

WordPress Trac wp-trac at lists.automattic.com
Sun Jun 20 09:24:49 UTC 2010


#14004: Custom columns for admin menu not working for custom post type with
hierarchy
--------------------------+-------------------------------------------------
 Reporter:  cubehouse     |       Owner:                                          
     Type:  defect (bug)  |      Status:  new                                     
 Priority:  normal        |   Milestone:  Unassigned                              
Component:  Post Types    |     Version:  3.0                                     
 Severity:  normal        |    Keywords:  post type hierarchical hierarchy columns
--------------------------+-------------------------------------------------
 When enabling a custom post-type to be hierarchical:
 $args = array(
 ...
         'hierarchical' => true
 ...
 );

 When trying to show custom columns, everything displays blank.
 The columns themselves appear, but the data inside them do not.

 By disabling hierarchical post types, all the date appears.

 I.e, this action hook does not trigger when post type is hierarchical.

 add_action('manage_posts_custom_column',  'my_show_columns');
 function my_show_columns($name) {
     global $post;
     switch ($name) {
         case 'views':
             echo "Show something";
     }
 }

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


More information about the wp-trac mailing list