WordPressでの月別アーカイブをfunctions.phpで
まえこんなんやってたけどfunctions.phpでできた
このサイトの場合
function jp_date_archive_wp_title( $title ) {
if ( is_date() ) {
$title = '';
if ( $y = intval(get_query_var('year')) )
$title .= sprintf('%4d/', $y);
if ( $m = intval(get_query_var('monthnum')) )
$title .= sprintf('%2d/', $m);
$title .= ' ';
}
return $title;
}
add_filter( 'wp_title', 'jp_date_archive_wp_title', 1 );