Help us understand the problem. What is going on with this article?

Wordpress で管理画面にカテゴリIDを表示

More than 5 years have passed since last update.


functions.php に

function add_category_columns($columns)
    $index = 1; // 追加位置

    return array_merge(
        array_slice($columns, 0, $index),
        array('id' => 'ID'),
        array_slice($columns, $index)
add_filter('manage_edit-category_columns', 'add_category_columns');

function add_category_custom_fields($deprecated, $column_name, $term_id)
    if ($column_name == 'id') {
        echo $term_id;
add_action('manage_category_custom_column', 'add_category_custom_fields', 10, 3);




Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away