WordPress 循环获取指定分类目录文章列表
开发WordPress网站就靠它了
<?php query_posts('cat=20&posts_per_page=4'); while(have_posts()): the_post(); ?>
其中cat=20代表分类ID,posts_per_page=4代表显示几条记录。
开发WordPress网站就靠它了
<?php query_posts('cat=20&posts_per_page=4'); while(have_posts()): the_post(); ?>
其中cat=20代表分类ID,posts_per_page=4代表显示几条记录。