用于引导转盘的Wordpress循环

用于引导转盘的Wordpress循环,wordpress,twitter-bootstrap,wordpress-theming,Wordpress,Twitter Bootstrap,Wordpress Theming,我试图在一张幻灯片上一次显示5个以上的项目,默认情况下,假设只有一个项目。我尝试创建两个循环,一个将内容放在活动类中,另一个将内容放在项目类中,post_per_page=3,我得到的第一个输出是在主页上发布三篇文章,但在第一张幻灯片之后,它变为一篇,对此可能的解决方案是什么 提前谢谢 我希望你能理解,这是我最好的解释方式 这就是我想要实现的目标 这是我的密码 <div id="myCarousel" class="carousel slide"> <!-- Carousel

我试图在一张幻灯片上一次显示5个以上的项目,默认情况下,假设只有一个项目。我尝试创建两个循环,一个将内容放在活动类中,另一个将内容放在项目类中,post_per_page=3,我得到的第一个输出是在主页上发布三篇文章,但在第一张幻灯片之后,它变为一篇,对此可能的解决方案是什么

提前谢谢

我希望你能理解,这是我最好的解释方式

这就是我想要实现的目标

这是我的密码

<div id="myCarousel" class="carousel slide">
 <!-- Carousel items -->
 <div class="carousel-inner">
 <?php 
  $my_query = new WP_Query('posts_per_page=3');
  while ($my_query->have_posts()) : $my_query->the_post();
  $do_not_duplicate = $post->ID;?>
   <!-- The 1st Loop... -->
   <div class="active item well-blue">
     <div class="offset1">              
     <h3><?php the_title(); ?></h3>
     <p class="lead"><?php $excerpt = strip_tags(get_the_excerpt()); echo $excerpt; ?></p>
     <a href="<?php the_permalink() ?>" class="btn" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">Read more...</a>
   </div> 
 </div>
    <?php endwhile; wp_reset_query(); ?> <?php
      // The 2nd Loop limits the query to 2 more posts...
    $limit_query = new WP_Query('posts_per_page=3');
  while ($limit_query->have_posts()) :$limit_query->the_post();$do_not_duplicate = $post->ID;?>
<!-- The 2nd Loop same data as 1st loop -->
<div class="item well-blue">
     <div class="offset1">              
     <h3><?php the_title(); ?></h3>
     <p class="lead"><?php $excerpt = strip_tags(get_the_excerpt()); echo $excerpt; ?></p>
     <a href="<?php the_permalink() ?>" class="btn" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">Read more...</a>
   </div> 
 </div>
<?php endwhile;  wp_reset_query(); ?>
  </div>
  <!-- Carousel nav -->
  <a class="carousel-control left" href="#myCarousel" data-slide="prev">&lsaquo;</a>
  <a class="carousel-control right" href="#myCarousel" data-slide="next">&rsaquo;</a>
检查此链接:

你只需要找到这条线

// Item size (set here the number of posts for each group)
$i = 4; 
把4换成5