wordpress调用指定分类文章
1 2 3 4 5 6 7 8 9 10 11 | <ul> <?php query_posts('cat=1&showposts=5'); ?>//cat是要调用的分类ID,showposts是需要显示的文章数量 <?php while (have_posts()) : the_post(); ?> <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li> <?php endwhile; wp_reset_query(); ?> </ul> |
浅唱6(微信/QQ号:909912499),欢迎分享本文,转载请保留出处!部分内容来自网络,如有侵权请联系删除处理!
相关信息
本站提供代码修改,dedecms,WordPress仿站二次开发 / PHP网站建设以及SEO优化等网络营销推广等服务。
如有需要请加QQ: 909912499