回答編集履歴
1
全角スペースが混じってるという最低なコードでした。。。すみません。
test
CHANGED
@@ -46,7 +46,7 @@
|
|
46
46
|
|
47
47
|
function my_topics_archives( $content ){
|
48
48
|
|
49
|
-
$content['post_type']
|
49
|
+
$content['post_type'] = 'topics';
|
50
50
|
|
51
51
|
return $content;
|
52
52
|
|
@@ -72,11 +72,11 @@
|
|
72
72
|
|
73
73
|
//topics, post投稿タイプのページではそれぞれの投稿タイプの月別アーカイブにする。
|
74
74
|
|
75
|
-
if( i
|
75
|
+
//ここら辺のifの判定内容については、状況によって書き換えてください。例:if( is_home() )
|
76
76
|
|
77
|
+
if( in_array( $post_type = get_post_type(), array( 'topics', 'post' ) ) ){
|
77
78
|
|
78
|
-
|
79
|
-
$content['post_type']
|
79
|
+
$content['post_type'] = $post_type;
|
80
80
|
|
81
81
|
}
|
82
82
|
|