title: Bootstrap carousel data-slide not working with WordPress
body: <p>I've run into an issue where my testimonial carousel is 99% working but for some reason, the carousel indicators as highlighted in the image below links don't skip to other slides on click.</p>
  
  <p><a href="https://i.stack.imgur.com/n8oC1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n8oC1.png" alt="enter image description here"></a></p>
  
  <p>The mouse hover state appears but then on click nothing happens. I believe I've set up the data-slide-to correctly.</p>
  
  <p>Not sure what I've done wrong to cause this.  </p>
  
  <p>
      </p>
  
  <pre><code>    &lt;div class="container"&gt;
          &lt;div class="row"&gt;
              &lt;div class='col-md-offset-2 col-md-8 text-center'&gt;
                  &lt;h2 class="uppercase"&gt;Testimonials&lt;/h2&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;?php $args = array(
              'post_type' =&gt; 'testimonial',
              'posts_per_page' =&gt; 3
              );
  
              $the_query = new WP_Query($args);
              if ($the_query-&gt;have_posts()) {
          ?&gt;
  
          &lt;div class='row'&gt;
              &lt;div class='col-md-offset-2 col-md-8'&gt;
                  &lt;div class="carousel slide" data-ride="carousel" id="quote-carousel"&gt;
                      &lt;ol class="carousel-indicators"&gt;
                          &lt;?php 
                              $count = count($the_query-&gt;posts);
                              for ($i=0; $i&lt;$count; $i++) {
                          ?&gt;
                          &lt;li data-target="carousel" data-slide-to="&lt;?php echo $i; ?&gt;"&lt;?php
                              if ($i == 0) {
                                  ?&gt; class="active"&lt;?php 
                              }
                          ?&gt;&gt;&lt;/li&gt;
                          &lt;?php 
                              }
                          ?&gt;
                      &lt;/ol&gt;
  
                      &lt;!-- Carousel Slides / Quotes --&gt;
                      &lt;div class="carousel-inner"&gt;
  
                          &lt;?php 
                              $count = 0;
                              while ($the_query-&gt;have_posts()) {
                                  $the_query-&gt;the_post();
                          ?&gt;
  
                          &lt;div class="item&lt;?php 
                              if ($count == 0) {
                                echo ' active';
                              }
                              ?&gt;"&gt;
                              &lt;blockquote&gt;
                                  &lt;p&gt;&lt;?php echo the_field('testimonial_quote') ?&gt;&lt;/p&gt;
                                  &lt;p&gt;&lt;?php echo the_field('testimonial_client_name') ?&gt;&lt;/p&gt;
                                  &lt;p&gt;&lt;?php echo the_field('testimonial_business_name') ?&gt;&lt;/p&gt;
                              &lt;/blockquote&gt;
                          &lt;/div&gt;
  
                          &lt;?php 
                            $count++;
                          }
                          ?&gt;
  
                      &lt;/div&gt;
                  &lt;/div&gt;
  
              &lt;?php wp_reset_postdata(); 
                  }
              ?&gt;
  
              &lt;/div&gt;
  
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is what the front end output code looks like</p>
  
  <pre><code>&lt;div class="col-md-offset-2 col-md-8"&gt;
              &lt;div class="carousel slide" data-ride="carousel" id="quote-carousel"&gt;
                  &lt;ol class="carousel-indicators"&gt;
  
                     &lt;li data-target="carousel" data-slide-to="0" class=""&gt;&lt;/li&gt;
                     &lt;li data-target="carousel" data-slide-to="1" class=""&gt;&lt;/li&gt;
                     &lt;li data-target="carousel" data-slide-to="2" class="active"&gt;&lt;/li&gt;
  
                  &lt;/ol&gt;
  
                  &lt;!-- Carousel Slides / Quotes --&gt;
                  &lt;div class="carousel-inner"&gt;
  
                      &lt;div class="item"&gt;
                          &lt;blockquote&gt;
                              &lt;p&gt;Elliott made suggestions about "big-picture" things that I wouldn't even have thought to ask. If you're thinking about working with Elliott, I highly encourage you to do so! He's friendly, knowledgeable, and gets you results!&lt;/p&gt;
                              &lt;p&gt;Nico Moreno&lt;/p&gt;
                              &lt;p&gt;Convertt&lt;/p&gt;
                          &lt;/blockquote&gt;
                      &lt;/div&gt; 
  
                      &lt;div class="item active left"&gt;
                          &lt;blockquote&gt;
                              &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur non malesuada diam. Nam lorem velit, placerat id mauris ac, ornare vehicula diam.&lt;/p&gt;
                              &lt;p&gt;Gus Davidson&lt;/p&gt;
                              &lt;p&gt;Arb &amp;amp; Grounds Equipment&lt;/p&gt;
                          &lt;/blockquote&gt;
                      &lt;/div&gt;
  
                      &lt;div class="item next left"&gt;
                          &lt;blockquote&gt;
                              &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur non malesuada diam. Nam lorem velit, placerat id mauris ac, ornare vehicula diam.&lt;/p&gt;
                              &lt;p&gt;Joe Smith&lt;/p&gt;
                              &lt;p&gt;Average Joe's Gym&lt;/p&gt;
                          &lt;/blockquote&gt;
                      &lt;/div&gt;
  
                  &lt;/div&gt;
              &lt;/div&gt;
  
          &lt;/div&gt;
  </code></pre>