<?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用栏目名称(category_name)调用指定栏目下的文章”的全面内容,想了解更多关于 wordpress 内容,请继续关注web建站教程。
当前网址:https://ipkd.cn/webs_14881.html
workflows工作流
星空星域星球comfyui工作流
一颗柔和的水晶金字塔ComfyUI工作流
一个美丽的女孩穿着花瓣做的衣服
一座古老的石阶,旁边有一棵树
一架受损严重的宇宙飞船内有一只猫
梦幻中的一只猫咪ComfyUI工作流
一尊白玉佛像ComfyUI工作流
一辆机器人虎狮高端混合动力车ComfyUI工作流
猜你喜欢
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!