Wordpress CSS / Less无法正常工作

时间:2018-03-19 19:51:00

标签: css wordpress less

我正在尝试将CS​​S添加到我的主题中。我写的更少,并使用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}

1 个答案:

答案 0 :(得分:0)

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

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