アーカイブタイトルの表示を「年」⇒「月」の順番に変更
月別の記事一覧で表示されるタイトルを 「月」 ⇒ 「年」 から 「年」 ⇒ 「月」 に変更。
修正前の archive.php 。
<div id="content">
<div id="innerbox">
<?php if ( is_year()) { ?>
<h2 class="posttitle"><?php wp_title(''); ?> 年の記事一覧</h2>
<?php } else{ ?>
<h2 class="posttitle"><?php single_month_title(); ?> の記事一覧</h2>
<?php } ?>
<?php if (have_posts() ) : while (have_posts() ) : the_post(); ?>
修正後の archive.php 。
<div id="content">
<div id="innerbox">
<?php if ( is_year()) { ?>
<h2 class="posttitle"><?php wp_title(''); ?> 年の記事一覧</h2>
<?php } else{ ?>
<h2 class="posttitle"><?php the_time('Y年n月'); ?>の記事一覧</h2>
<?php } ?>
<?php if (have_posts() ) : while (have_posts() ) : the_post(); ?>
過去に何冊か購入した WordPress の参考書、なかなか役に立ってる。






この記事のコメント・トラックバックRSS
この記事へのコメント・トラックバックはありません。