【发布时间】:2015-04-08 23:28:31
【问题描述】:
我在 http://eventdepotnj.com 上使用 WooShop 主题并为其创建子主题。
我用这个style.css创建了一个新目录/wooshop-child:
/*
Theme Name: WooShop Child
Description: Child theme for WooShop
Author: Blue Star Multimedia
Template: wooshop
*/
我用这段代码添加了一个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' );
}
但它不起作用。
我将编辑的 header.php 和 footer.php 文件上传到子主题文件夹以覆盖常规主题,这很有效。但是,当我对 style.css 文件进行任何更改时,它并没有出现在我的子主题上,它似乎没有出现。有什么想法吗?
【问题讨论】:
-
如果您直接浏览到您的样式表 (eventdepotnj.com/wp-content/themes/wooshop-child/…) 并刷新,您会看到您的代码吗?
-
我看到那里的代码,但它不是最近更新的版本(我刚刚更新了 20px 的段落字体大小,看看它是否有效)