title: wordpress PHP to show 3 slide per page with bootstrap carousel
body: <p>hello i tried to show 3 slide per page with bootstrap carousel but when I use wordpress php query it showed just 1 slide per page :( and for show another slide i should click on next... please see this <a href="http://bootsnipp.com/snippets/featured/responsive-moving-box-carousel" rel="nofollow noreferrer">http://bootsnipp.com/snippets/featured/responsive-moving-box-carousel</a>
  I tried to code this by php query .
  my php code :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="carousel slide" id="myCarousel"&gt;
      &lt;div class="carousel-inner"&gt;
        &lt;?php
  $counter=0;
         ?&gt;
          &lt;div class="item &lt;?php if($counter==0){echo 'active';} ?&gt;"&gt;
                  &lt;ul class="thumbnails"&gt;
                    &lt;?php
                    $my_query = new WP_Query('showposts=3&amp;cat=1');
                    while ($my_query-&gt;have_posts()):
                    $my_query-&gt;the_post();
                    $do_not_duplicate = $post-&gt;ID;?&gt;
                                    &lt;li class="col-sm-4"&gt;
              &lt;div class="shakhes"&gt;
                &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_post_thumbnail('shakhes') ?&gt;&lt;/a&gt;
  
              &lt;div class="caption"&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;
                &lt;h4&gt;&lt;div class="livicon" data-name="chevron-left" data-size="30"  data-color="#555" data-hovercolor="#555" &gt;&lt;/div&gt;&lt;?php the_title(); ?&gt;&lt;/h4&gt;&lt;/a&gt;
                &lt;p&gt;&lt;?php the_content_rss('', TRUE, '', 20); ?&gt;&lt;/p&gt;
              &lt;div class="moreshakhes"&gt;  &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;مشاهده ادامه مطلب&lt;/a&gt;&lt;/div&gt;
              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/li&gt;
  &lt;?php endwhile; ?&gt;
  
                  &lt;/ul&gt;
            &lt;/div&gt;
  &lt;?php $counter++; ?&gt;
  
  
      &lt;/div&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-right"&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-left"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/nav&gt;
   &lt;!-- /.control-box --&gt;
  
  &lt;/div&gt;&lt;!-- /#myCarousel --&gt;</code></pre>
  </div>
  </div>
  </p>