ฉันมีช่องที่กำหนดเองซึ่งผู้ใช้สามารถเลือกพื้นหลังของ div ได้ อย่างไรก็ตาม ที่มุมขวาบนหรือหน้าจอจะแสดงสิ่งนี้:
35, , 4c5a6729201043.55e72a8144693, , , รูปภาพ/jpeg, http://localhost:1337/kite/wp-content/uploads/2015/11/4c5a6729201043.55e72a8144693.jpg, 1200, 1200, อาร์เรย์');
รหัสที่ฉันใช้เพื่อให้ผู้ใช้เลือกพื้นหลัง (รวมถึงเนื้อหา) คือ:
<?php $image = get_field( 'slide_bg1' );
if ( !empty( $image ) ) { ?>
<div class="slide1" style="background-image:url('<?php echo $image['url']; ?>');">
<?php the_field('slide_bg1'); ?>');<div class="slide1-cont"><p class="slide-text"><h1><?php the_field('slide_title1'); ?></h1><img src="<?php bloginfo('template_directory')?>/images/line.png" /></p>
<p><?php the_field('slide_content1'); ?></p></div>
</div>
<?php } ?>
var_dump ของ $image:
array (10) { ["id"]=> int (35) ["alt"]=> string (0) "" ["title"]=> string (28) "4c5a6729201043.55e72a8144693" ["คำบรรยายภาพ"] => string(0) "" ["คำอธิบาย"]=> string(0) "" ["mime_type"]=> string(10) "image/jpeg" ["url"]=> string(86) "http://localhost:1337/kite/wp-content/uploads/2015/11/4c5a6729201043.55e72a8144693.jpg" ["width"]=> int(1200) ["height"]=> int(1200) ["ขนาด"]=> array(9) { ["ภาพขนาดย่อ"]=> string(94) "http://localhost:1337/kite/wp-content/uploads/2015/11/4c5a6729201043.55e72a8144693-150x150.jpg" ["ขนาดย่อความกว้าง"]=> int(150) [" รูปขนาดย่อความสูง"]=> int(150) ["ปานกลาง"]=> string(94) "http://localhost:1337/kite/wp-content/uploads/2015/11/4c5a6729201043.55e72a8144693-300x300.jpg" ["ความกว้างปานกลาง "]=> int(300) ["ความสูงปานกลาง"]=> int(300) ["ใหญ่"]=> string(96) "http://localhost:1337/kite/wp-เนื้อหา/อัปโหลด/2015/11/4c5a6729201043.55e72a8144693-1024x1024.jpg" ["ความกว้างขนาดใหญ่"]=> int(900) ["ความสูงขนาดใหญ่"]=> int(900) } }
ภาพหน้าจอของมุมซ้ายบน
ฉันจะกำจัดข้อความนี้ได้อย่างไร มันเป็นข้อผิดพลาดหรือไม่?