カスタム投稿の年別アーカイブの表示について
-
初めまして、wordpress初心者です。
カスタム投稿で作成した記事のアーカイブを年別で
下記のように表示させたいのですが、方法がわかりません。■2015年
2015.xx.xx ブログタイトル
2015.xx.xx ブログタイトル
2015.xx.xx ブログタイトル
2015.xx.xx ブログタイトル■2014年
2014.xx.xx ブログタイトル
2014.xx.xx ブログタイトル
2014.xx.xx ブログタイトル
2014.xx.xx ブログタイトル■2013年
・
・
・サイドバーに年を表示させて、その年のアーカイブに飛ばす方法は見つかったのですが、上記のような形で表示する方法がわかりませんでした。
記事は最新のものから順に全件表示させたいです。カスタム投稿生成のために、functions.phpには以下のように記載しています。
add_action(‘init’, ‘register_posttype’);
function register_posttype() {
$labels = array(‘name’=>’ブログ’,’singular_name’=>’blog’);
$args = array(
‘labels’ => $labels,
‘public’ => true,
‘query_var’ => true,
‘rewrite’ => true,
‘capability_type’ => ‘page’,
‘has_archive’ => true,
‘hierarchical’ => true,
‘menu_position’ => 21,
‘supports’ => array(‘title’,’editor’,’excerpt’,’custom-fields’,’revisions’)
);
register_post_type(‘blog’,$args);
}テンプレートファイルは、archive-blog.phpです。
どなたかご教示いただけますようどうぞお願いいたします。
- トピック「カスタム投稿の年別アーカイブの表示について」には新たに返信することはできません。