基于@Mangesh Parte代码,您可以在标题之前的第一列显示特色图像。
add_filter(\'manage_posts_columns\', \'add_img_column\');
add_filter(\'manage_posts_custom_column\', \'manage_img_column\', 10, 2);
function add_img_column($columns) {
$columns = array_slice($columns, 0, 1, true) + array("img" => "Featured Image") + array_slice($columns, 1, count($columns) - 1, true);
return $columns;
}
function manage_img_column($column_name, $post_id) {
if( $column_name == \'img\' ) {
echo get_the_post_thumbnail($post_id, \'thumbnail\');
}
return $column_name;
}