【发布时间】:2015-10-27 14:09:05
【问题描述】:
我遵循了一个关于如何将子主题加入队列的非常简单的教程,但是当我真正去编辑我的 style.css 时,没有任何转移。我是否使用了错误的 given 代码?
style.css
/*
Theme Name: Blank Slate Child
Theme URI: http://www.efficientmind.org/blankslate-child/
*/
functions.php 中的排队代码
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
?>
【问题讨论】:
-
我不明白...你是说编辑子主题 style.css 时什么都没有发生吗?
-
@rnevius 没错。我添加了代码以尝试修改我的元素之一,但什么也没发生。
-
我现在正在阅读another tutorial,它说我需要“注册”我的孩子主题 style.css ......但另一个没有提到这一点!这有多重要?