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

ワードプレステーマ別

TCDテーマORION特別ページ「Distinations」のタイトルを変更する方法

Q.特別ページアーカイブページのタイトルを変更したい

特別ページアーカイブページのタイトルは、デフォルトで「Distinations」になっています。
それを変更したい場合は以下の方法で可能です。

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

編集するファイル:functions.php

編集する箇所:

// カスタム投稿 「特別ページ」を追加 ----------------------------------------------------------------

if ( function_exists('register_post_type') ) {
 $labels = array(
  'name' => __('Distinations', 'tcd-w'),
  'singular_name' => __('Distinations', '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' => '【任意の文字】',
  'singular_name' => __('Distinations', 'tcd-w'),
  'add_new' => __('Add New', 'tcd-w'),
  'add_new_item' => __('Add New Item', 'tcd-w'),
  'edit_item' => __('Edit', 'tcd-w'),https://tcd-manual.net/wp-admin/post-new.php#
  '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' => ''
 );

※パーマリンク変更を伴いますので、以前のスラッグは使用不可となります。
上記変更により404エラーが出た際は 設定>パーマリンク設定で変更を保存ボタンを押下します。(設定変更は不要で、ただ保存ボタンを押すだけで結構です。)

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

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

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