▽1
●
a-kuma3 ●100ポイント ベストアンサー |
RCG forest のテーマでは、wp_title で「サイト名 セパレータ ページ名」となるように実装されています。
http://themes.svn.wordpress.org/rcg-forest/2.0.2/functions.php
// Title function rcg_forest_wp_title($title, $sep) { global $paged, $page; $title = get_bloginfo('name') . " $sep " . $title; // ★ここ! if($paged >= 2 || $page >= 2) { $title .= sprintf(__('Page %s', 'rcg-forest'), max($paged, $page)); } else { $title = preg_replace('#\\s\\|\\s$#', '', $title); } return $title; } add_filter('wp_title', 'rcg_forest_wp_title', 10, 2);
ページ番号をタイトルに含めることも含めて RCG forest の機能を無効にするなら、add_filter をコメントアウトすれば良いと思います。
// Title function rcg_forest_wp_title($title, $sep) { global $paged, $page; $title = get_bloginfo('name') . " $sep " . $title; if($paged >= 2 || $page >= 2) { $title .= sprintf(__('Page %s', 'rcg-forest'), max($paged, $page)); } else { $title = preg_replace('#\\s\\|\\s$#', '', $title); } return $title; } // ★ここをコメントアウト // add_filter('wp_title', 'rcg_forest_wp_title', 10, 2);
ページ番号を含める機能を活かすのであれば、サイト名をつけているところをこめんとあうとしてください。
// Title function rcg_forest_wp_title($title, $sep) { global $paged, $page; // ★ここをコメントアウト // $title = get_bloginfo('name') . " $sep " . $title; if($paged >= 2 || $page >= 2) { $title .= sprintf(__('Page %s', 'rcg-forest'), max($paged, $page)); } else { $title = preg_replace('#\\s\\|\\s$#', '', $title); } return $title; } add_filter('wp_title', 'rcg_forest_wp_title', 10, 2);