SHARE
TWEET

Untitled

a guest Aug 20th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div class="carousel-inner" role="listbox">
  2.  
  3.           <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); $i++; ?>
  4.  
  5.             <?php if ($i==1) { ?>
  6.                 <div class="carousel-item active">
  7.             <?php } else { ?>
  8.                 <div class="carousel-item">
  9.             <?php } ?>
  10.  
  11.                 <?php if ( has_post_thumbnail() ) {
  12.                     $url = wp_get_attachment_url( get_post_thumbnail_id() );
  13.                 ?>  
  14.                 <div style="background-image: url('<?php echo $url; ?>')"></div>
  15.                 <?php } ?>
  16.  
  17.             </div><!-- carousel-item active -->
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top