回答編集履歴

2

\.\.\.

2017/08/21 10:09

投稿

OsCh
OsCh

スコア111

test CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  $image_url = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
8
8
 
9
- echo '<div class="thumbnail-box" style="background-image:url('. image_url[0]. '"></div>';
9
+ echo '<div class="thumbnail-box" style="background-image:url('. $image_url[0]. '"></div>';
10
10
 
11
11
  } else {
12
12
 

1

変数名が違ってた

2017/08/21 10:09

投稿

OsCh
OsCh

スコア111

test CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  $image_url = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
8
8
 
9
- echo '<div class="thumbnail-box" style="background-image:url('. $image[0]. '"></div>';
9
+ echo '<div class="thumbnail-box" style="background-image:url('. image_url[0]. '"></div>';
10
10
 
11
11
  } else {
12
12