【问题标题】:Wordpress error when installing parent theme安装父主题时出现 Wordpress 错误
【发布时间】:2018-10-20 20:22:13
【问题描述】:

我是网络开发新手:尝试将自定义主题安装到 Wordpress。运行 Windows 10 并使用 MAMP 在本地服务器上工作。

当我去查看我的主题时,我收到以下消息:

Broken Themes
The following themes are installed but incomplete.

Name        Description
mywebsite   The parent theme is missing. Please install the "mywebsite;" parent theme.

我在尝试安装时遇到错误:

An unexpected error occurred. Something may be wrong with WordPress.org or this 
server’s configuration. If you continue to have problems, please try the support
forums.

有人知道我该如何解决这个问题吗?

谢谢

【问题讨论】:

  • 你用的是什么主题?
  • 我正在尝试上传我自己的自定义主题。我在主题目录中创建了一个新文件夹,并为 index.php 文件添加了 index.php、style.css 和我自己的自定义 css。
  • 请提供代码

标签: wordpress windows server themes mamp


【解决方案1】:

检查你的主题子 style.css 中是否有:

/*
    Theme Name: yourtheme-child
    Template: yourtheme
    Text Domain: yourtheme-child
*/

在主题 style.css 中:

/*
    Theme Name: yourtheme
*/

【讨论】:

  • 嗯,它说“找不到父主题。”澄清一下 - 在我的自定义主题文件夹中,我只有 3 个文件 - 1 个 index.php、1 个带有 cmets 的 style.css 和 1 个实际的 css 文件。
猜你喜欢
  • 2015-09-11
  • 1970-01-01
  • 2020-04-13
  • 1970-01-01
  • 2015-07-14
  • 2022-01-21
  • 1970-01-01
  • 2017-03-23
  • 2019-07-19
相关资源
最近更新 更多