Skip to main content
added 14 characters in body
Source Link
fuxia
  • 107.1k
  • 38
  • 255
  • 459

Its done : $backgroundImg = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );

$string .=' ' .

 $backgroundImg = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );
              
 $string .=' <div class="main-slider-item" style="background-image: url('.$backgroundImg[0].'); background-size: cover; background-repeat: no-repeat;">' .

Its done : $backgroundImg = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );

$string .=' ' .

Its done :

 $backgroundImg = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );
              
 $string .=' <div class="main-slider-item" style="background-image: url('.$backgroundImg[0].'); background-size: cover; background-repeat: no-repeat;">' .
Source Link
Ruby
  • 3
  • 6

Its done : $backgroundImg = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );

$string .=' ' .