Opened 15 years ago
Closed 15 years ago
#14004 closed defect (bug) (worksforme)
Custom columns for admin menu not working for custom post type with hierarchy
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Posts, Post Types | Keywords: | post type hierarchical hierarchy columns |
Focuses: | Cc: |
Description (last modified by )
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"; } }
Change History (4)
#3
in reply to:
↑ 1
@
15 years ago
Replying to dd32:
Off the top of my head, This may be because page_rows() is used to display hierarchical types (instead of post_rows())
Can you try using the page filter instead? (I'm thinking its 'manage_pages_custom_column'?)
Huzzah! You are most correct - there is so little documentation on this at the moment.
Not really sure what the change the bug status too now.
Note: See
TracTickets for help on using
tickets.
Off the top of my head, This may be because page_rows() is used to display hierarchical types (instead of post_rows())
Can you try using the page filter instead? (I'm thinking its 'manage_pages_custom_column'?)