【问题标题】:Can't activate child theme in Wordpress无法在 Wordpress 中激活子主题
【发布时间】:2013-10-17 12:01:14
【问题描述】:

我的网站是http://test.javatutorialhub.com/

我必须为一个名为 udesign 的主题创建一个子主题。

我已经做了必要的事情。但是当我激活子主题时,我会收到一条消息,说“这个主题需要父主题”。

这是我的functions.php代码

<?php

/*
* Add your own functions here. You can also copy some of the theme functions into this file. 
* Wordpress will use those functions instead of the original functions then.
*/

这里是 style.css 的代码

/*
 Theme Name:     U-design Child Theme
 Theme URI:      http://themeforest.net/item/udesign-wordpress-theme/253220?ref=internq7
 Description:    A slick, powerful and clean theme.
 Author:         Andon
 Author URI:     http://themeforest.net/user/internq7/portfolio?ref=internq7
 Template:       u-design
 Version:        2.1.0

*/

那我做错了什么?

注意:有人对我说你不能激活子主题。这是真的吗?请帮忙。

【问题讨论】:

  • 非常明显的东西,但你的 wordpress 中有u-design 主题?其他的是添加@import url("../u-design/style.css");
  • 你想在functions.php中完成什么?此外,正如@wordpresser 所说,您在子主题文件夹中的 style.css 文件中缺少一行。不能激活子主题是不正确的。一切只需要在正确的地方。再次查看instructions,确保没有遗漏任何步骤。

标签: wordpress wordpress-theming


【解决方案1】:

我必须为 称为 udesign 的主题创建一个子主题。

你的 CSS 标题标签

模板:u-design

这两个不匹配,这就是它不起作用的原因(根据提供的信息假设)

在 css 标题关键字template 中始终放置父主题的文件夹名称

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-06-01
    • 1970-01-01
    • 2021-10-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多