質問編集履歴
1
・HTMLのコードを追記しました。 ・試したこと - count関数をis_countable関数に変えてみた - !empty($pages)を足してみた
test
CHANGED
File without changes
|
test
CHANGED
@@ -30,7 +30,37 @@
|
|
30
30
|
|
31
31
|
|
32
32
|
|
33
|
-
```
|
33
|
+
```HTML
|
34
|
+
|
35
|
+
<div class="news_box">
|
36
|
+
|
37
|
+
<?php $posts = get_posts('numberposts=2'); ?>
|
38
|
+
|
39
|
+
<?php foreach($posts as $post): ?>
|
40
|
+
|
41
|
+
<a href="<?php the_permalink(); ?>">
|
42
|
+
|
43
|
+
<?php the_post_thumbnail(array(250,250), array('class' => 'left')); ?></a>
|
44
|
+
|
45
|
+
<div class="news_box_text">
|
46
|
+
|
47
|
+
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
|
48
|
+
|
49
|
+
<p class="time"><?php the_time('Y年m月d日(D)'); ?></p>
|
50
|
+
|
51
|
+
<p><?php the_content(); ?></p>
|
52
|
+
|
53
|
+
/div>
|
54
|
+
|
55
|
+
<?php endforeach; ?>
|
56
|
+
|
57
|
+
</div>
|
58
|
+
|
59
|
+
```
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
```PHP
|
34
64
|
|
35
65
|
|
36
66
|
|
@@ -172,6 +202,18 @@
|
|
172
202
|
|
173
203
|
|
174
204
|
|
205
|
+
【追記】
|
206
|
+
|
207
|
+
・HTMLのコードを追記しました。
|
208
|
+
|
209
|
+
・試したこと
|
210
|
+
|
211
|
+
- count関数をis_countable関数に変えてみた
|
212
|
+
|
213
|
+
- !empty($pages)を足してみた
|
214
|
+
|
215
|
+
|
216
|
+
|
175
217
|
恐れ入りますが、お知恵をお借りできれば幸いです。
|
176
218
|
|
177
219
|
よろしくお願いいたします。
|