Bazı aramalardan sonra, manage_edit-${post_type}_columns
filtreyi ve manage_${post_type}_posts_custom_column
eylemi kullanarak bir çözüm buldum .
Sütunlar filtreyle oluşturulur ve ardından sütun eylemle doldurulur. Bu bağlantıdaki fikirler kullanılarak ek sütunların kolayca eklenebileceğini ve doldurulabileceğini varsayıyorum http://justintadlock.com/archives/2011/06/27/custom-columns-for-custom-post-types
add_filter('manage_edit-article_columns', 'my_columns');
function my_columns($columns) {
$columns['article_category'] = 'Category';
return $columns;
}
add_action( 'manage_article_posts_custom_column', 'my_manage_article_columns', 10, 2 );
function my_manage_article_columns( $column, $post_id ) {
global $post;
switch( $column ) {
/* If displaying the 'article_category' column. */
case 'article_category' :
/* Get the genres for the post. */
$terms = get_the_terms( $post_id, 'article_category' );
/* If terms were found. */
if ( !empty( $terms ) ) {
$out = array();
/* Loop through each term, linking to the 'edit posts' page for the specific term. */
foreach ( $terms as $term ) {
$out[] = sprintf( '<a href="%s">%s</a>',
esc_url( add_query_arg( array( 'post_type' => $post->post_type, 'article_category' => $term->slug ), 'edit.php' ) ),
esc_html( sanitize_term_field( 'name', $term->name, $term->term_id, 'article_category', 'display' ) )
);
}
/* Join the terms, separating them with a comma. */
echo join( ', ', $out );
}
/* If no terms were found, output a default message. */
else {
_e( 'No Articles' );
}
break;
/* Just break out of the switch statement for everything else. */
default :
break;
}
}