Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/249.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
当我尝试在wordpress header.php文件中添加我的theme.css时,page.php不起作用_Php_Wordpress_Woocommerce_Wordpress Theming_Fixed - Fatal编程技术网

当我尝试在wordpress header.php文件中添加我的theme.css时,page.php不起作用

当我尝试在wordpress header.php文件中添加我的theme.css时,page.php不起作用,php,wordpress,woocommerce,wordpress-theming,fixed,Php,Wordpress,Woocommerce,Wordpress Theming,Fixed,在my header.php中,我为CSS添加了以下代码: <link id="theme" rel="stylesheet" href="<?php echo esc_url(get_template_directory_uri()); ?>/css/theme.css"> 这不是最佳做法。向主题添加脚本和样式的正确方法是将它们排列在functions.php文件中 浏览此链接一次:- 代码中存在PHP错误,无法显示该错误。右键单击->查看页面源代码,href属性是否

在my header.php中,我为CSS添加了以下代码:

<link id="theme" rel="stylesheet" href="<?php echo esc_url(get_template_directory_uri()); ?>/css/theme.css">

这不是最佳做法。向主题添加脚本和样式的正确方法是将它们排列在
functions.php
文件中

浏览此链接一次:-

代码中存在PHP错误,无法显示该错误。右键单击->查看页面源代码,
href
属性是否在HTML中正确呈现?如果您知道,请尝试用url替换该属性