我试图在我的类别中进行不同的查询,比如一个偏移量为post的查询和一个显示一个post的查询,但尽管它继续通过循环,这就是我所拥有的,但循环不断重复,我几乎认为我做得不对。有人知道怎么了吗?
<?php if (have_posts()) : $count = 0; ?>
<div id="featured-category">
<div class="heading"><h2 class="recent-post-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2></div>
<?php query_posts(\'showpost=1\'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="FC-image">
</div>
</div>
<?php endwhile ?>
<?php wp_reset_query(); ?>
<div id="recent-posts">
<!-- Post Starts -->
<div class="post">
<?php query_posts(\'showpost=4&offset=1\'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post-img">
</div>
<div class="heading"><h2 class="recent-post-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2></div>
<div class="recent-post-content">
<?php get_the_excerpt_limit( 200, \'... Read More »\' ); ?>
</div><!-- /.heading -->
</div><!-- /.post -->
<?php endwhile ?>
<?php wp_reset_query(); ?>
<?php query_posts(\'offset=4\'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post">
<div class="heading"><h2 class="recent-post-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2></div>
<div class="recent-post-content two">
<?php get_the_excerpt_limit( 200, \'... Read More »\' ); ?>
</div><!-- /.heading -->
</div><!-- /.post -->
<?php endwhile ?>
<?php wp_reset_query(); ?>
<?php endwhile ?>