WordPress函数 get_footer() Error 404 – Not Found

鱼见海资源网最新教程:

介绍

包含当前主题目录中的footer.php模板文件。 如果指定了名称,则将包含专门的页脚 -{name}.php。

如果主题不包含footer.php文件,则将包含默认主题 wp-includes/theme-compat/footer.php 中的页脚。

使用

参数

$name
(string) (optional) Calls for footer-name.php.
Default: None

返回

None.

示例

简单的404页面

以下代码是“HTTP 404:Not Found”错误的模板的简单示例(您可以将其作为404.php包含在主题中)。

Error 404 - Not Found

多个页脚

在不同的页面显示不同的页脚。

在首页使用 footer-home.php,404页面使用 footer-404.php,其他页面使用 footer.php。

参考资料:https://codex.wordpress.org/Function_Reference/get_footer

文章来源于互联网

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

昵称

取消
昵称表情代码图片

    暂无评论内容