HOME » plugin , tips , Wordpress » monthchunksの表記を日本語にしてみた
monthchunksの表記を日本語にしてみた
2008/05/06 | Comments & Trackbacks : 0

このサイトでは月別アーカイブへのリンク表示にmonthchunksを使っているのですが、そのまま使うと全て数字のみで表示されるので、これを「年」とか「月」もくっつくように書き換えました。
上のキャプチャみたいな感じです。
サイドバーで使う分には必要ないと思いますが、未来に備えて一応メモ。
書き換えるのは本体・monthchunks.phpの「// start the list item displaying the year」以降です。
【123行目】
print "<li><strong>$year</strong><br />\n";↓ $year_= $year ."年"; print "<li><strong>$year_</strong><br />\n";
【135行目】
print "<strong title='$month->post_month_name $year'>$month->display_month</strong>";↓ //print "<strong title='$month->post_month_name $year'>$month->display_month</strong>"; $month_ = $month->display_month . "月 "; print "<strong title='$month->post_month_name $year'>$month_</strong>";
【139行目】
print "<a href='" . get_month_link($year, $month->post_month) . "' title='$month->post_month_name $year'>" . $month->display_month . "</a>";↓ //print "<a href='" . get_month_link($year, $month->post_month) . "' title='$month->post_month_name $year'>" . $month->display_month . "</a>"; $month_ = $month->display_month . "月 "; print "<a href='" . get_month_link($year, $month->post_month) . "' title='$month->post_month_name $year'>" . $month_ . "</a>";
Related Posts
- Tags : plugin , tips , Wordpress | TrackBack URL
- Prev : Wordpressでページタイトルを全て異なった表記にする | Next : 讃岐うどん 條辺@上福岡
Comments & Trackbacks : 0