質問編集履歴
2
追記2
test
CHANGED
File without changes
|
test
CHANGED
@@ -90,7 +90,7 @@
|
|
90
90
|
|
91
91
|
</div>
|
92
92
|
|
93
|
-
<p class="tbborder-txt mincho">SMILE
|
93
|
+
<p class="tbborder-txt mincho">SMILE</p>
|
94
94
|
|
95
95
|
<p class="time"><?php the_time("Y.m.d"); ?></p>
|
96
96
|
|
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -55,3 +55,69 @@
|
|
55
55
|
WordPressに詳しい方ご教示いただければと思います。
|
56
56
|
|
57
57
|
よろしくお願いいたします。
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
テンプレート
|
62
|
+
|
63
|
+
```php
|
64
|
+
|
65
|
+
<?php
|
66
|
+
|
67
|
+
$args = array(
|
68
|
+
|
69
|
+
"post_type"=>"smile",
|
70
|
+
|
71
|
+
"post_per_page"=>2,
|
72
|
+
|
73
|
+
);
|
74
|
+
|
75
|
+
$the_query = new WP_Query($args);
|
76
|
+
|
77
|
+
$counter = 0;
|
78
|
+
|
79
|
+
if($the_query->have_posts()):
|
80
|
+
|
81
|
+
while($the_query->have_posts()): $the_query->the_post(); ?>
|
82
|
+
|
83
|
+
<li class="grid <?php echo ($counter == 0) ? 'first':'normal'; ?>">
|
84
|
+
|
85
|
+
<a href="<?php the_permalink(); ?>">
|
86
|
+
|
87
|
+
<div class="post-fig">
|
88
|
+
|
89
|
+
<?php the_automatic_thumbnail_url(get_template_directory_uri()."/common/img/base/noimage_xl.png", "tmb_cut_760x450"); ?>
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<p class="tbborder-txt mincho">SMILE KOUEI通信</p>
|
94
|
+
|
95
|
+
<p class="time"><?php the_time("Y.m.d"); ?></p>
|
96
|
+
|
97
|
+
<h2><?php the_title(); ?></h2>
|
98
|
+
|
99
|
+
<?php if($counter == 0): ?>
|
100
|
+
|
101
|
+
<div class="ex"><?php echo nl2br(get_the_excerpt()); ?></div>
|
102
|
+
|
103
|
+
<?php endif; ?>
|
104
|
+
|
105
|
+
<div class="gray-switch">
|
106
|
+
|
107
|
+
<span>詳しくはこちら</span>
|
108
|
+
|
109
|
+
</div>
|
110
|
+
|
111
|
+
</a>
|
112
|
+
|
113
|
+
</li>
|
114
|
+
|
115
|
+
<?php $counter++; ?>
|
116
|
+
|
117
|
+
<?php endwhile; ?>
|
118
|
+
|
119
|
+
<?php endif; ?>
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
```
|