限时免费试用:欢迎注册 api.bigmodel.org ,快速体验大模型 API 接入服务。

Wordpress

wordpress模板开发 | 循环的使用(4)

列表中循环的使用 判断是否有文章 have_posts()赋值item the_post()输出标题 the_title()输出链接 the_permalink()输出内容 the_content()这里输出内容有个小技巧,默认全部全部输出内容,不易截取,可以再编辑器中添加more前台页面显示> 本文由子枫笔记快捷发布!

作者
王明昌
发布时间

列表中循环的使用

ID); // var_dump($post->post_date); // var_dump($post->post_title); ?>

"> the_title(); ?>

the_content(); ?>

判断是否有文章 have_posts()

赋值item the_post()

输出标题 the_title()

输出链接 the_permalink()

输出内容 the_content()


这里输出内容有个小技巧,默认全部全部输出内容,不易截取,可以再编辑器中添加more


image.png





前台页面显示

image.png

> 本文由子枫笔记快捷发布!

0/500
友善分享您的看法。
反馈邮箱