質問編集履歴

3

コード追加しました。

2016/10/28 01:09

投稿

t-maekawa
t-maekawa

スコア44

test CHANGED
File without changes
test CHANGED
@@ -321,3 +321,189 @@
321
321
 
322
322
 
323
323
  よろしくお願いします。
324
+
325
+
326
+
327
+ 以下にコードを記述いたします。
328
+
329
+ ```ここに言語を入力
330
+
331
+ <div class="flexslider">
332
+
333
+ <ul class="slides">
334
+
335
+ <li>
336
+
337
+ <img src="<?php
338
+
339
+ $image = get_field('image01');
340
+
341
+ if( !empty($image) ):
342
+
343
+ // vars
344
+
345
+ $url = $image['url'];
346
+
347
+ $title = $image['title'];
348
+
349
+ $alt = $image['alt'];
350
+
351
+ $caption = $image['caption'];
352
+
353
+ // thumbnail
354
+
355
+ $size = 'thumbnail';
356
+
357
+ $thumb = $image['sizes'][ $size ];
358
+
359
+ $width = $image['sizes'][ $size . '-width' ];
360
+
361
+ $height = $image['sizes'][ $size . '-height' ];
362
+
363
+
364
+
365
+ if( $caption ): ?>
366
+
367
+ <div class="wp-caption">
368
+
369
+ <?php endif; ?>
370
+
371
+ <a href="<?php echo $url; ?>" title="<?php echo $title; ?>">
372
+
373
+ <img src="<?php echo $thumb; ?>" alt="<?php echo $alt; ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" />
374
+
375
+ </a>
376
+
377
+ <?php if( $caption ): ?>
378
+
379
+ <p class="wp-caption-text"><?php echo $caption; ?></p>
380
+
381
+ </div>
382
+
383
+ <?php endif; ?>
384
+
385
+
386
+
387
+ <?php endif; ?>
388
+
389
+ </li>
390
+
391
+ <li>
392
+
393
+ <img src="<?php
394
+
395
+ $image = get_field('image02');
396
+
397
+ if( !empty($image) ):
398
+
399
+ // vars
400
+
401
+ $url = $image['url'];
402
+
403
+ $title = $image['title'];
404
+
405
+ $alt = $image['alt'];
406
+
407
+ $caption = $image['caption'];
408
+
409
+ // thumbnail
410
+
411
+ $size = 'thumbnail';
412
+
413
+ $thumb = $image['sizes'][ $size ];
414
+
415
+ $width = $image['sizes'][ $size . '-width' ];
416
+
417
+ $height = $image['sizes'][ $size . '-height' ];
418
+
419
+
420
+
421
+ if( $caption ): ?>
422
+
423
+ <div class="wp-caption">
424
+
425
+ <?php endif; ?>
426
+
427
+ <a href="<?php echo $url; ?>" title="<?php echo $title; ?>">
428
+
429
+ <img src="<?php echo $thumb; ?>" alt="<?php echo $alt; ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" />
430
+
431
+ </a>
432
+
433
+ <?php if( $caption ): ?>
434
+
435
+ <p class="wp-caption-text"><?php echo $caption; ?></p>
436
+
437
+ </div>
438
+
439
+ <?php endif; ?>
440
+
441
+
442
+
443
+ <?php endif; ?>
444
+
445
+ </li>
446
+
447
+ <li>
448
+
449
+ <img src="<?php
450
+
451
+ $image = get_field('image03');
452
+
453
+ if( !empty($image) ):
454
+
455
+ // vars
456
+
457
+ $url = $image['url'];
458
+
459
+ $title = $image['title'];
460
+
461
+ $alt = $image['alt'];
462
+
463
+ $caption = $image['caption'];
464
+
465
+ // thumbnail
466
+
467
+ $size = 'thumbnail';
468
+
469
+ $thumb = $image['sizes'][ $size ];
470
+
471
+ $width = $image['sizes'][ $size . '-width' ];
472
+
473
+ $height = $image['sizes'][ $size . '-height' ];
474
+
475
+
476
+
477
+ if( $caption ): ?>
478
+
479
+ <div class="wp-caption">
480
+
481
+ <?php endif; ?>
482
+
483
+ <a href="<?php echo $url; ?>" title="<?php echo $title; ?>">
484
+
485
+ <img src="<?php echo $thumb; ?>" alt="<?php echo $alt; ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" />
486
+
487
+ </a>
488
+
489
+ <?php if( $caption ): ?>
490
+
491
+ <p class="wp-caption-text"><?php echo $caption; ?></p>
492
+
493
+ </div>
494
+
495
+ <?php endif; ?>
496
+
497
+ <?php endif; ?>
498
+
499
+ </li>
500
+
501
+
502
+
503
+
504
+
505
+ </ul>
506
+
507
+ </div>
508
+
509
+ ```

2

プラグインと追加しました。

2016/10/28 01:09

投稿

t-maekawa
t-maekawa

スコア44

test CHANGED
File without changes
test CHANGED
File without changes

1

別の方法

2016/10/22 06:50

投稿

t-maekawa
t-maekawa

スコア44

test CHANGED
File without changes
test CHANGED
@@ -313,3 +313,11 @@
313
313
 
314
314
 
315
315
  知識不足で申し訳ありませんがよろしくお願いいたします。
316
+
317
+
318
+
319
+ また、もし別の方法がありましたらご教授いただけましたら幸いです。
320
+
321
+
322
+
323
+ よろしくお願いします。