title: carasoul slider for gallery post not working in wordpress
body: <p>I have create a custom post for showing gallery  on home page and fetch all the post on home page need to show the 6 images in each slider </p>
  
  <p>please check below code..</p>
  
  <pre><code>&lt;div class="container-fluid"&gt;
      &lt;div class="row second-row"&gt;
          &lt;div   
              class="container"&gt;
              &lt;h2&gt;gallery&lt;/h2&gt;
              &lt;p&gt;Lorem Ipsum is simply dummy  
                  text of the printing and typesetting industry.
              &lt;/p&gt;
              &lt;nav&gt;
                  &lt;ul   
                      class="control-box pager"&gt;
                      &lt;li&gt;&lt;a data-slide="prev"   
                          href="#myCarousel" class=""&gt;&lt;i class="glyphicon   
                          glyphicon-chevron-left"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a data-slide="next"   
                          href="#myCarousel" class=""&gt;&lt;i class="glyphicon   
                          glyphicon-chevron-right"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/nav&gt;
          &lt;/div&gt;
          &lt;div   
              class="container"&gt;
              &lt;div class="row"&gt;
                  &lt;div class="carousel slide   
                      text-center" id="myCarousel"&gt;
                      &lt;div class="carousel-inner"&gt;
                          &lt;?php   
                              $the_query = new WP_Query(array( 'post_type' =&gt; 'gallery',   
                              'posts_per_page' =&gt; 6 )); while ( $the_query-&gt;have_posts() ) :   
                              $the_query-&gt;the_post(); ?&gt; 
                          &lt;div class="item active"&gt;
                              &lt;ul   
                                  class="thumbnails"&gt;
                                  &lt;li class="col-sm-2"&gt;
                                      &lt;div class="fff"&gt;
                                          &lt;div   
                                              class="thumbnail"&gt; &lt;a href="#"&gt;&lt;img alt="" src="&lt;img src="&lt;?php   
                                              the_post_thumbnail('large'); ?&gt;"&gt;&lt;/a&gt; &lt;/div&gt;
                                          &lt;p&gt;&lt;?php   
                                              the_title();?&gt;&lt;/p&gt;
                                      &lt;/div&gt;
                                  &lt;/li&gt;
                              &lt;/ul&gt;
                          &lt;/div&gt;
                          &lt;!-- /Slide1 --&gt; &lt;?php  
                              endwhile; wp_reset_postdata(); ?&gt; &lt;?php $the_query = new   
                              WP_Query(array( 'post_type' =&gt; 'gallery', 'posts_per_page' =&gt; 6,   
                              'offset' =&gt; 1 )); while ( $the_query-&gt;have_posts() ) :   
                              $the_query-&gt;the_post(); ?&gt; 
                          &lt;div class="item"&gt;
                              &lt;ul class="thumbnails"&gt;
                                  &lt;li class="col-sm-2"&gt;
                                      &lt;div class="fff"&gt;
                                          &lt;div class="thumbnail"&gt; &lt;a   
                                              href="#"&gt; &lt;img src="&lt;img src="&lt;?php the_post_thumbnail('large'); ?&gt;   
                                              "&gt;&lt;/a&gt; &lt;/div&gt;
                                          &lt;p&gt;&lt;?php the_title();?&gt;&lt;/p&gt;
                                      &lt;/div&gt;
                                  &lt;/li&gt;
                              &lt;/ul&gt;
                          &lt;/div&gt;
                          &lt;!-- /Slide2 --&gt; &lt;?php endwhile; wp_reset_postdata(); ?&gt; 
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <hr>
  
  <hr>