没有加载子主题的style.css

时间:2017-01-09 11:46:43

标签: wordpress themes

我试图在commercial tm-organik theme之上使用子主题。我在/themes/中创建了一个包含style.css文件的子文件夹,其中包含以下内容:

/*
Theme Name: My child theme name
Template: tm-organik
*/

父主题的名称是正确的(我知道它区分大小写,所以我尊重它)。在仪表板中,子主题处于活动状态。然而,儿童主题style.css永远不会被加载。为什么不呢?

1 个答案:

答案 0 :(得分:0)

在您的孩子主题中尝试更精细的style.css。

https://codex.wordpress.org/Child_Themes

在链接上,在"如何创建子主题"您可以找到必须使用的样式表标题(当然用您的数据替换数据):

/*
 Theme Name:   Twenty Fifteen Child
 Theme URI:    http://example.com/twenty-fifteen-child/
 Description:  Twenty Fifteen Child Theme
 Author:       John Doe
 Author URI:   http://example.com
 Template:     twentyfifteen
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  twenty-fifteen-child
*/

你必须声明你的孩子主题是什么(模板)的孩子主题,并提供其他重要信息。

我希望这能解决你的问题。

相关问题