回答編集履歴
1
コードの間違いを修正(動作未確認)
test
CHANGED
@@ -38,7 +38,11 @@
|
|
38
38
|
|
39
39
|
$myposts = get_posts('posts_per_page=-1&year='.$year.'&order=ASC');
|
40
40
|
|
41
|
-
|
41
|
+
$contents .= '<div class="content_area';
|
42
|
+
|
43
|
+
$contents .= ($counter==1) ? (''):(' hide');
|
44
|
+
|
45
|
+
$contents .= '">';
|
42
46
|
|
43
47
|
foreach ( $myposts as $post )
|
44
48
|
|
@@ -46,21 +50,13 @@
|
|
46
50
|
|
47
51
|
setup_postdata( $post );
|
48
52
|
|
49
|
-
$contents .= '<div class="content_area';
|
50
|
-
|
51
|
-
$contents .= ($counter==1) ? (''):(' hide');
|
52
|
-
|
53
|
-
$contents .= '">';
|
54
|
-
|
55
53
|
$contents .= get_the_content(); // ここで投稿ごとに必要な値を取得・格納
|
56
|
-
|
57
|
-
$contents .= '</div>';
|
58
54
|
|
59
55
|
}
|
60
56
|
|
61
57
|
wp_reset_postdata();
|
62
58
|
|
63
|
-
|
59
|
+
$contents .= '</div>';
|
64
60
|
|
65
61
|
$counter++;
|
66
62
|
|