致命错误:在第1行的index.php中调用未定义的函数get_header() [英] Fatal error: Call to undefined function get_header() in index.php on line 1

查看:329
本文介绍了致命错误:在第1行的index.php中调用未定义的函数get_header()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有同样的问题.我对PHP完全陌生.我安装了 XAMPP 并从WordPress下载了填充图案.当我运行index.php时,出现以下错误

I have the same issue. I am totally new in PHP. I installed XAMPP and downloaded the hatch theme from WordPress. When I run index.php it gives me the following error

致命错误:在第1行的C:\ xampp \ htdocs \ hatch \ index.php中调用未定义的函数get_header()"

"Fatal error: Call to undefined function get_header() in C:\xampp\htdocs\hatch\index.php on line 1"

我该如何解决?

推荐答案

您似乎正在尝试在WordPress安装之外运行WordPress主题.

It appears that you're trying to run a WordPress theme outside of an installation of WordPress.

您需要下载 WordPress 的副本,并将其解压缩到您的htdocs文件夹中(就像您所做的那样)主题),然后在浏览器中导航到该主题.

You need to download a copy of WordPress, extract it into your htdocs folder (like you did with the theme), and then navigate to it in your browser.

设置完毕(只需按照说明进行操作),您需要将该主题放置在WordPress安装中的wp-content/themes中.

After setting it up (just follow the instructions), you need to place that theme in wp-content/themes inside the WordPress install.

然后,您可以在WordPress管理员面板中将主题更改为新主题.

Then, you can change the theme to your new one in your WordPress administrator panel.

这篇关于致命错误:在第1行的index.php中调用未定义的函数get_header()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆