WordPress调用分类文章。
<?php query_posts('cat=841&showposts=5'); ?>
<?php while (have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink() ?>" target="_blank" ><?php the_title(); ?></a></li>
<?php endwhile; wp_reset_query();?>
其中cat=841&showposts=5——841是指分类id,5是指调用文章的数量。