14は一番最初にかいてあったわ
ヘッダークリーナーの効力で 位置が変わって解らなくて 2時間位無駄に迷った
その産物
ファンクション500行あたり
見覚えのあるコードがここに
function twentyfourteen_wp_title( $title, $sep ) {
global $paged, $page;
if ( is_feed() ) {
return $title;
}
// Add the site name.
$title .= get_bloginfo( 'name' );
// Add the site description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) ) {
$title = "$title $sep $site_description";
}
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 ) {
$title = "$title $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) );
}
return $title;
}
add_filter( 'wp_title', 'twentyfourteen_wp_title', 10, 2 );
これはwp_titleにひっかけるフッックってやつだ
このように細工した
function twentyfourteen_wp_title( $title, $sep ) {
global $paged, $page;
if ( is_feed() ) {
return $title;
}
// Add the site name.
$title .= get_bloginfo( 'name' );
// Add the site description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) ) {
$title = "$title $sep $site_description |邦楽 J-POP アコースティック";
}
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 ) {
$title = "$title $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) );
}
return $title;
}
add_filter( 'wp_title', 'twentyfourteen_wp_title', 10, 2 );
これじゃ全部はかわらんもんで
あとはヘッダー
<title><?php wp_title( '|', true, 'right' ); ?></title>
(区切り文字 $display 右だ)
こいつを色々
<?php if(is_category(4))://カテゴリ:ライブスケジュールの場合
$ccc = '今後の';
elseif(is_page( '62' )):
$ccc = '過去の';
endif;
if(in_category(4) and is_single() )://カテゴリ:ライブスケジュールの場合
$d_day= get_the_time('Y年m月d日 ');
$d_live= 'LIVE ';
endif;
$ddd = ' | 邦楽 J-POP アーティスト | 愛知 岐阜 三重';
?>
<title><?php echo $d_live,$ccc, wp_title( '|', true, 'right' ); echo $ddd;?></title>
<meta property="og:title" content="<?php echo $d_day, the_title(); ?> | 中村愛香.jp" />