Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $query = new WP_Query( $wpplnum );
- while( $query->have_posts() ): $query->the_post();
- ?>
- <div class="carousel-item col-md-4 active">
- <div class="card">
- <img class="card-img-top img-fluid" src="http://placehold.it/800x600/f44242/fff" alt="Card image cap">
- <div class="card-body">
- <h4 class="card-title">Card 1</h4>
- <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
- <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
- </div>
- </div>
- </div>
- <div class="carousel-item col-md-4 <?php echo $query->current_post >= 1 ? '' : 'active'; ?>">
- $query = new WP_Query($wpplnum);
- $first = TRUE;
- while($query->have_posts()):$query->the_post();
- $class = "";
- if($first)
- {
- $class = "active";
- $first = FALSE;
- }
- ?>
- <div class="carousel-item col-md-4 <?php echo esc_attr( $class ); ?>">
- .....
- </div>
Add Comment
Please, Sign In to add comment