管理メニューの「投稿」をカスタマイズ
'20.02.08functions.phpに下記コードを追加
function change_post_menu_label() { global $menu; global $submenu; $menu[5][0] = 'INFORMATION'; $submenu['edit.php'][5][0] = 'INFORMATION一覧'; $submenu['edit.php'][10][0] = '新規追加'; $submenu['edit.php'][16][0] = 'タグ'; } function change_post_object_label() { global $wp_post_types; $labels = &$wp_post_types['post']->labels; $labels->name = 'INFORMATION'; $labels->singular_name = 'INFORMATION'; $labels->add_new = _x('新規追加', 'INFORMATION'); $labels->add_new_item = '新規追加'; $labels->edit_item = '編集'; $labels->new_item = '新規記事'; $labels->view_item = '記事を表示'; $labels->search_items = '記事を検索'; $labels->not_found = '記事が見つかりませんでした'; $labels->not_found_in_trash = 'ゴミ箱に記事は見つかりませんでした'; } add_action( 'init', 'change_post_object_label' ); add_action( 'admin_menu', 'change_post_menu_label' );
(View1928)