Q.トップページのtitleタグ、descripitionを任意のテキストに変更したいです。
テーマ仕様では、設定>一般の設定内容が以下のように出力される仕様となっております。
<title>サイトのタイトル | キャッチフレーズ</title>
<meta name=”description” content=”キャッチフレーズ”>
A.下記の方法でカスタマイズしてください。
・titleの内容を変更する
編集するファイル: functions/seo.php
編集する箇所: 184行目付近
} elseif (is_author()) {
global $wp_query;
$curauth = $wp_query->get_queried_object();
$title = sprintf(__('Archive for %s', 'tcd-w'), $curauth->display_name);
return $title;
} else {
↓
} elseif (is_author()) {
global $wp_query;
$curauth = $wp_query->get_queried_object();
$title = sprintf(__('Archive for %s', 'tcd-w'), $curauth->display_name);
return $title;
} elseif (is_front_page()||is_home()) {
$title = sprintf(__('任意の文言'));
return $title;
} else {
・descripitonの内容を変更する
編集するファイル: functions/seo.php
編集する箇所: 269行目付近
} elseif (is_category()) {
↓
} elseif (is_front_page()||is_home()){ printf(__('任意の文言'));
} elseif (is_category()) {
この記事は役に立ちましたか?
もし参考になりましたら、下のボタンで教えてください。
今後の記事作成の参考とさせて頂きます!