WordPress函数get_template_part()

鱼见海资源网最新教程:

介绍

get_template_part( string $slug, string $name = null )

get_template_part()是用于调用主题目录中的文件。

参数

$slug
(string) (必填) The slug name for the generic template.

$name
(string) (选填) The name of the specialised template.

Default value: null

示例

调用主题中的 loop-index.php 文件。

调用子目录 partials 中的 content-page.php 文件。

调用不同的导航栏文件。

文章来源于互联网

© 版权声明
THE END
喜欢就支持一下吧
点赞89 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容