WordPress CSS / Less 不工作

Wordpress CSS / Less not working

我正在尝试将 CSS 添加到我的主题中。我写的比较少,用grunt编译成style.css文件。 Grunt 工作正常并且 css 文件看起来正确。在我的在线帐户中,我可以看到 css 文件,wordpress 将 style.css 识别为样式表,但 css 在网站上不起作用。你能看出我的错吗?

header.php

<!DOCTYPE html>
<head>
<title>

</title>

<?php wp_head(); ?>
</head>

functions.php

<?php function adding_css() {
wp_enqueue_style('css-style', get_stylesheet_uri()); } add_action('wp_enqueue_scripts', 'adding_css' );

style.css

#footer{display:flex;flex-flow:wrap}.footer .try{color:red;height:2px}body{height:20px}html{width:5px}

哦,该死,我发现了我的错。

我将 functions.php 包含在 js 子文件夹中,Wordpress 没有在其中找到它。现在可以了。