「TCD AWARD 2023」受賞サイトを発表しました。

ワードプレステーマ別

カスタム投稿タイプ名「商品」を変更する

Q.menuページの「商品」という文言やタイトルを変更したい

カスタム投稿タイプの「商品」を変更する方法をご案内します。管理画面と、サイトのタイトルが共に変更されます。

A.下記のphpファイルの該当箇所を編集します

編集するファイル:functions.php
編集する箇所:
362行目

 // カスタム投稿 「メニュー」を追加 ----------------------------------------------------------------

if ( function_exists('register_post_type') ) {
 $labels = array(
  'name' => __('Product', 'tcd-w'),
  'singular_name' => __('Product', 'tcd-w'),
  'add_new' => __('Add New', 'tcd-w'),
  'add_new_item' => __('Add New Item', 'tcd-w'),
  'edit_item' => __('Edit', 'tcd-w'),
  'new_item' => __('New item', 'tcd-w'),
  'view_item' => __('View Item', 'tcd-w'),
  'search_items' => __('Search Items', 'tcd-w'),
  'not_found' => __('Not Found', 'tcd-w'),
  'not_found_in_trash' => __('Not found in trash', 'tcd-w'),
  'parent_item_colon' => ''
 );

 // カスタム投稿 「メニュー」を追加 ----------------------------------------------------------------

if ( function_exists('register_post_type') ) {
 $labels = array(
  'name' => __('●●●', 'tcd-w'),
  'singular_name' => __('Product', 'tcd-w'),
  'add_new' => __('Add New', 'tcd-w'),
  'add_new_item' => __('Add New Item', 'tcd-w'),
  'edit_item' => __('Edit', 'tcd-w'),
  'new_item' => __('New item', 'tcd-w'),
  'view_item' => __('View Item', 'tcd-w'),
  'search_items' => __('Search Items', 'tcd-w'),
  'not_found' => __('Not Found', 'tcd-w'),
  'not_found_in_trash' => __('Not found in trash', 'tcd-w'),
  'parent_item_colon' => ''
 );

●●●に任意の文字列をご入力ください。

この記事は役に立ちましたか?

もし参考になりましたら、下のボタンで教えてください。
今後の記事作成の参考とさせて頂きます!

同じテーマのカスタマイズ記事