回答編集履歴
1
answer
CHANGED
@@ -44,4 +44,32 @@
|
|
44
44
|
<?php } ?>
|
45
45
|
|
46
46
|
</div><!--/jisseki_wrap-->
|
47
|
-
```
|
47
|
+
```
|
48
|
+
|
49
|
+
###追記
|
50
|
+
追加したhave_postsにそれらの投稿を全部抜き出す条件を指定してやったらどうでしょう?
|
51
|
+
|
52
|
+
|
53
|
+
例
|
54
|
+
|
55
|
+
```
|
56
|
+
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
|
57
|
+
```
|
58
|
+
↓
|
59
|
+
```
|
60
|
+
<?php
|
61
|
+
$args = array(
|
62
|
+
'post_type' => 'post',
|
63
|
+
'posts_per_page' => -1,
|
64
|
+
'post_status' => 'publish',
|
65
|
+
|
66
|
+
);
|
67
|
+
$query = new WP_Query( $args );
|
68
|
+
|
69
|
+
if ( $query->have_posts() ) : while ( $query->have_posts() ): $query->the_post(); ?>
|
70
|
+
```
|
71
|
+
|
72
|
+
カテゴリーや投稿タイプ等の必要な情報を当て込んでください。
|
73
|
+
|
74
|
+
関数リファレンス/WP Query
|
75
|
+
[https://wpdocs.osdn.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/WP_Query](https://wpdocs.osdn.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/WP_Query)
|