I'm building a theme for the first time, using Bootstrap 3 integrated with Wordpress to do so. I have a carousel partially working. Right now it shows the slides in reverse order, i.e. Slide 3, Slide 2, Slide 1. Then it breaks and goes to a blank screen.
This is the code I'm using. Any ideas why this is happening or what I could try to both make it go in the right order and make it loop infinitely?
<div class="container">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<?php $new_query = new WP_Query('post_type=slide&posts_per_page=3');
$i = 1;
while ( $new_query->have_posts()) : $new_query->the_post(); ?>
<div class="item <?php if ($i == 1) echo 'active'; ?>" >
<img src="<?php the_field('slide_image'); ?>" >
<div class="carousel-caption">
<h1><small><?php the_field('slide_caption'); ?></small></h1>
</div><!--carousel-caption-->
</div><!--item active -->
<?php
$i++;
endwhile;
wp_reset_postdata();
?>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>