<?php query_posts('cat=20&posts_per_page=4'); while(have_posts()): the_post(); ?> <li><a href="<?php the_permalink(); ?>" target="_blank"><?php the_title();?></a></li> <?php endwhile; wp_reset_query(); ?>
其中cat=20表明分类ID,posts_per_page=4表明显示几条记录
php
有用就点个赞吧!
post