LoginSignup
1
1

More than 5 years have passed since last update.

[覚書]Wordpress管理画面にカスタム投稿タイプのターム欄を追加

Posted at
functions.php
function add_custom_column($defaults){
    $defaults['makerscat'] = 'カテゴリー';
    return $defaults;
}
add_filter('manage_posts_columns','add_custom_column');

function add_custom_column_id($column_name,$id){
    if($column_name == 'makerscat'){
        echo get_the_term_list($id,'makerscat','',',');
    }
}
add_action('manage_posts_custom_column','add_custom_column_id',10,2);

makerscatの部分はカスタムタクソノミー名を入力。
'カテゴリー'が一覧の項目名になる。

http://techmemo.biz/wordpress/add-custom-column-posts/

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1