是的,这里有一些钩子:manage_posts_custom_column
伪代码:
function my_cpt_custom_column( $column ) {
global $post;
if ( \'my_cpt\' == get_post_type( $post ) ) {
switch ( $column ) {
case \'title\':
// do stuff with $post->post_title
echo $post->post_title;
break;
case \'some-other-heading\':
// do stuff
break;
}
}
}
add_action( \'manage_posts_custom_column\', \'my_cpt_custom_column\' );