Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/79.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
Jquery Wordpress没有';我看不到我的新style.css文件_Jquery_Html_Css_Wordpress - Fatal编程技术网

Jquery Wordpress没有';我看不到我的新style.css文件

Jquery Wordpress没有';我看不到我的新style.css文件,jquery,html,css,wordpress,Jquery,Html,Css,Wordpress,我正在尝试向wordpress添加新的样式表,我正在通过所有旧的.css文件的函数添加样式表,这些文件正在工作。所以,当我添加新文件时,wordpress看不到它,当我从view source中单击文件链接时,我得到404错误,但该文件位于相同的文件夹中,并且与所有旧的.css文件具有相同的链接,只是名称不同。 我试图清理缓存,更新永久链接,但问题仍然是一样的 <link rel="stylesheet" href="<?php bloginfo('template_director

我正在尝试向wordpress添加新的样式表,我正在通过所有旧的.css文件的函数添加样式表,这些文件正在工作。所以,当我添加新文件时,wordpress看不到它,当我从view source中单击文件链接时,我得到404错误,但该文件位于相同的文件夹中,并且与所有旧的.css文件具有相同的链接,只是名称不同。 我试图清理缓存,更新永久链接,但问题仍然是一样的

<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/custom/assets/css/customname.css"/>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/custom/assets/css/news-internal.css"/>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/custom/assets/css/skinprofile.css"/>

您不能通过“bloginfo()”包含样式。试一试

所以

因此,在大括号之间,你必须注意:

'bs' => Name of your Style-Sheet you want. It can be different to the real name of the file
get_template_directory_uri() => same like bloginfo()
afterward(!) ". '/style.css' => . is connector between url and your file
所以URL看起来像

http://www.yourwebsite.de/style.css
在你的Wordpress里

http://www.yourwebsite.de/wp-content/themes/themesname/style.css
如果文件位于另一个方向,则必须修改点(“.”)后的路径

所以在你的Wordpress里看起来

http://www.yourwebsite.de/wp-content/themes/themesname/order1/order2/file.min.css

首先去查看源代码,检查css文件“customname.css”是否列出。如果该文件显示在view source中,那么单击该文件的链接仍然可以在那里获得404。然后首先检查文件夹中文件名为“customname.css”的文件名。然后通过比较视图源路径和目录结构来检查整个路径。仍然得到相同的问题,然后检查您使用的是子主题还是简单主题

<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/custom/assets/css/customname.css"/>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/custom/assets/css/news-internal.css"/>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/custom/assets/css/skinprofile.css"/>

问题在于我的filezilla客户端,我的文件无法上载,但我可以看到它。

我再次上传了它,之后我可以通过链接访问我的.css文件。

您使用的是子主题吗?我使用的是论文主题,但有很多自定义更改。主题如何影响新文件,但如果我以相同方式导入旧文件,则不会影响旧文件。
wp_enqueue_style( 'test', get_template_directory_uri() . '/order1/order2/file.min.css');
http://www.yourwebsite.de/wp-content/themes/themesname/order1/order2/file.min.css
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/custom/assets/css/customname.css"/>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/custom/assets/css/news-internal.css"/>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/custom/assets/css/skinprofile.css"/>