小编ahm*_*her的帖子

致命错误:调用未定义的函数get_header()

我正在使用此代码转到页面.在我的目录中有主题文件夹ch.

<li>
<a href="<?php echo get_stylesheet_directory_uri(); ?>/ch/bn1.php">
    <img src="<?php echo get_stylesheet_directory_uri(); ?>/img/bn1.png">
</a>
</li>
Run Code Online (Sandbox Code Playgroud)

但是转到页面url wp-content/themes/live/ch/bn1.php会显示此消息

致命错误:在第1行的C:\ wamp\www\blog\wp-content\themes\live stream\ch\bn1.php中调用未定义的函数get_header()

我的主题目录是

www/blog/wp-content/themes/live stream
Run Code Online (Sandbox Code Playgroud)

我要转到目录的页面是

www/blog/wp-content/themes/live stream/ch/bn1.php
Run Code Online (Sandbox Code Playgroud)

php wordpress header function undefined

2
推荐指数
1
解决办法
8200
查看次数

标签 统计

function ×1

header ×1

php ×1

undefined ×1

wordpress ×1