一品网
  • 首页

WordPress 循环获取指定分类目录文章列表


开发WordPress网站就靠它了

<?php query_posts('cat=20&posts_per_page=4'); while(have_posts()): the_post(); ?>   
   
  • <?php the_title();?>
  • <?php endwhile; wp_reset_query(); ?>

    其中cat=20代表分类ID,posts_per_page=4代表显示几条记录。

    WordPress

    相关


    腾讯云搭建个人博客wordpress

    搭建LVS_nat,负载均衡两个wordpress应用

    记wordpress博客windows平台转到linux遇到的问题

    Day8-Redis、Mysql、Wordpress站点(nginx+php+mysql)、dubbo+zookeeper微服务、Ingress

    wordpress报 [REQ_ERR: 403] [KTrafficClient] Something is wrong. Enable debug mod

    wordpress报 [REQ_ERR: 403] [KTrafficClient] Something is wrong. Enable debug mod

    wordpress 安装 Elementor PRO 插件(破解版)

    Centos7 搭建wordpress

    k8s中部署wordpress

    关于 wordpress

    听说你想在 WordPress 网站上嵌入 PPT ?

    Wordpress笔记:WP如何设置网站邮件订阅功能?

    标签

    一品网 冀ICP备14022925号-6