質問編集履歴

2

コードの追加

2019/01/30 04:06

投稿

konoha0708
konoha0708

スコア36

test CHANGED
File without changes
test CHANGED
@@ -233,3 +233,59 @@
233
233
  ?>
234
234
 
235
235
  ```
236
+
237
+
238
+
239
+
240
+
241
+ 追記↓
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+ ```ここに言語を入力
252
+
253
+
254
+
255
+ <script type="text/javascript">
256
+
257
+ (function($) {
258
+
259
+ $(document).ready(function() {
260
+
261
+ $('.tab_area:first').show();
262
+
263
+ $('.tab-1 li:first').addClass('active');
264
+
265
+
266
+
267
+ $('.tab-1 li').click(function() {
268
+
269
+ $('.tab-1 li').removeClass('active');
270
+
271
+ $(this).addClass('active');
272
+
273
+ $('.tab_area').hide();
274
+
275
+
276
+
277
+ $(jQuery(this).find('a').attr('href')).fadeIn();
278
+
279
+ return false;
280
+
281
+ });
282
+
283
+ });
284
+
285
+ })(jQuery);
286
+
287
+ </script>
288
+
289
+
290
+
291
+ ```

1

コードの追加

2019/01/30 04:06

投稿

konoha0708
konoha0708

スコア36

test CHANGED
File without changes
test CHANGED
@@ -191,3 +191,45 @@
191
191
  </div>
192
192
 
193
193
  ```
194
+
195
+
196
+
197
+
198
+
199
+ ```
200
+
201
+ // カテゴリ別新着
202
+
203
+ function cat_post_list( $show_num, $cat_id ) {
204
+
205
+ global $post;
206
+
207
+ $args = array( 'posts_per_page' => $show_num, 'cat' => $cat_id );
208
+
209
+ $myposts = get_posts( $args );
210
+
211
+ foreach( $myposts as $post ) {
212
+
213
+ setup_postdata($post);
214
+
215
+ ?>
216
+
217
+ <li>
218
+
219
+ <a href="<?php the_permalink(); ?>" class="cate-title">
220
+
221
+ <?php the_title(); ?></a>
222
+
223
+ </li>
224
+
225
+ <?php
226
+
227
+ }
228
+
229
+ wp_reset_postdata();
230
+
231
+ }
232
+
233
+ ?>
234
+
235
+ ```