怎么样
<?php
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query(\'cat=1,2,3,4&showposts=5\');
if ( have_posts() ) while ( have_posts() ) : the_post();
while ($wp_query->have_posts()) : $wp_query->the_post();
?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-content">
<span class="blog-date"><?php the_time(\' M jS, Y\') ?></span>
<h2 class="blog-post-title">
<?php the_title(); ?>
</h2>
<?php the_content(); ?>
</div><!-- .entry-content -->
</div><!-- #post-## -->
<?php endwhile; ?>
<?php
$wp_query = null;
$wp_query = $temp;
?>
实际上,这只是一个自定义查询,您仍然可以对其进行筛选以显示帖子数量等。。