<?php $args = array( 'category_name' => '栏目名称', 'showposts' => '10', //文章条数 ); $cn_posts = new WP_Query($args); if ($cn_posts -> have_posts() ) : while ($cn_posts -> have_posts() ) : $cn_posts -> the_post(); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endwhile; endif; wp_reset_postdata(); ?>
标签: wordpress入门, wordpress文章调用
上面是“wordpress用栏目名称(category_name)调用指定栏目下的文章”的全面内容,想了解更多关于 wordpress 内容,请继续关注web建站教程。
当前网址:https://ipkd.cn/webs_14881.html
workflows工作流
去掉背景(抠图)comfyui工作流
奋斗的小黄人ComfyUI工作流
三阶放大comfyui工作流
一棵白色心形流苏树comfyui工作流
一个美丽的女孩穿着花瓣做的衣服
一张超现实主义美女照片ComfyUI工作流
一颗闪闪发光的水晶漂浮在森林里
小孩手握锤子顽皮搞笑卡通3d形象
猜你喜欢
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!