您可以使用以下代码添加新列。代替(your-texanomy)
用你的分类鼻涕虫。我已经测试过了,效果很好。https://prnt.sc/qbibg0
#add header before category name
function taxonomy_custom_column_header( $columns ){
$columns = array_slice($columns, 0, 1, true) +
array("cat_id" => "ID") +
array_slice($columns, 1, count($columns) - 1, true) ;
return $columns;
}
add_filter( "manage_edit-(your-texanomy)_columns", \'taxonomy_custom_column_header\', 10);
# add value to newly added column
function taxonomy_custom_column_content( $value, $column_name, $tax_id ){
if ( \'cat_id\' == $column_name ) {
$content = $tax_id;
}
return $content;
}
add_action( "manage_(your-texanomy)_custom_column", \'taxonomy_custom_column_content\', 10, 3);