【发布时间】:2015-02-11 11:16:15
【问题描述】:
我想问一下为什么我的样式表没有显示在网页的页面源上。请看下面的代码,这是我的functions.php中的代码。
`function theme_styles() {
wp_enqueue_style( 'main', get_template_directory_uri() . '/style.css' );
}
add_action( 'wp_enqueue_scripts', 'theme-styles' );`
我相信我已经正确输入了代码,但是每当我右键单击网页并查找源代码时,我的样式表都没有显示。顺便说一句,我正在使用 WebMatrix,我的 style.css 位于我目前正在处理的主题文件夹下。我是 WordPress 新手,我正在尝试创建自己的自定义主题。任何帮助将不胜感激。
非常感谢,
吉尔伯特·雅各布
【问题讨论】:
标签: wordpress wordpress-theming