Posted: 2014.03.25 / Category: WordPress WordPressでコーポレートサイトを構築するとき、年度別リンクとか記事一覧を表示したいときがまれにありますのでご紹介します。 年度別アーカイブリスト 「・2014年度・2013年度・・・」のリンクの表示ですね。 最初に「functions.php」に下記を追加して。 functions.php function get_archives_by_fiscal_year( $args = '' ) { global $wpdb, $wp_locale; $defaults = array ( 'post_type' => 'post', 'limit' => '', 'format' => 'html', 'before' => '', 'after' => '', 'show_post_count' =>
![WordPressで年度別記事一覧を表示する](https://cdn-ak-scissors.b.st-hatena.com/image/square/4a3a2973dd7939605d3daca5f8858bbc32b103b0/height=288;version=1;width=512/https%3A%2F%2Fwww.webopixel.net%2Fimg%2Fog.png)