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

WordPress管理画面の「投稿」を別の名前に変更

More than 1 year has passed since last update.

「投稿」を「ニュース」に変える

functions.php
function change_post_menu_label() {
  global $menu;
  global $submenu;
  $menu[5][0] = 'ニュース';
  $submenu['edit.php'][5][0] = 'ニュース一覧';
  $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 = 'ニュース';
  $labels->singular_name = 'ニュース';
  $labels->add_new = _x('追加', 'ニュース');
  $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' );
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
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  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
ユーザーは見つかりませんでした