我想在一个特定类别中插入12篇帖子,但我只看到一些帖子。
就像第一次的前4个帖子和其他时间的其他帖子一样。我能做什么?
<支持>Editor note:
据我所知,该问题在第一次查询中显示了4篇帖子,在第二次查询中显示了其余帖子(共12篇中的8篇)
这是第一次查询的代码:
<?php $the_query = new WP_Query(\'cat=6&order=ASC&showposts=4\'); ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<div class="padding-10">
<?php the_post_thumbnail(); ?>
<div class="latestpost-dis">
<div class="date"> <?php the_date(); ?> <span>BY</span> <?php the_author(); ?></div>
<h4><?php the_title(); ?></h4>
<p><?php the_excerpt(); ?></p>
<p class="margin-top-20"><a href="#" class="btn btn-info">Read More</a></p>
</div>
这是第二次查询:<?php $the_query = new WP_Query(\'cat=6&order=ASC&showposts=-1,-2,-3,-4\');?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<div class="padding-10">
<?php the_post_thumbnail(); ?>
<div class="latestpost-dis">
<div class="date"> <?php the_date(); ?> <span>BY</span> <?php the_author(); ?></div>
<h4><?php the_title(); ?></h4>
<p><?php the_excerpt(); ?></p>
<p class="margin-top-20"><a href="#" class="btn btn-info">Read More</a></p>
</div>