简体   繁体   English

删除wordpress标题中的空脚本

[英]Remove an empty script in wordpress header

My WordPress version is 3.2.1. 我的WordPress版本是3.2.1。

An empty script is placed inside the head tags: 一个空脚本放置在head标签内:

<script type='text/javascript' src='Actual theme path?ver=3.2.1'></script>

I deactivated all my plugins and checked it. 我停用了所有插件并进行了检查。 But it looks that same. 但是看起来一样。 Then I looked into my functions.php . 然后我查看了我的functions.php I can see the following scripts: 我可以看到以下脚本:

wp_enqueue_script('nivo', BFI_TEMPLATEURL . 'scripts/jquery.nivo.slider.js', array('jquery'),'3.2.1');
wp_enqueue_script('bfi', BFI_TEMPLATEURL . 'scripts/bfi.min.js', array('jquery', 'superfish', 'cufonfont', 'ytchromeless', 'flowplayer', 'ajaxupload', 'nivo'), '1.0.14');

The empty script that I mentioned comes between these two scripts but I couldn't find it in functions.php . 我提到的空脚本介于这两个脚本之间,但在functions.php找不到。

Is jquery.nivo.slider.js -file included? 是否包含jquery.nivo.slider.js文件? I'm asking because '3.2.1'-version of this script required and in the 'empty script tag' version equals to '3.2.1' too Actual theme path?ver=3.2.1 . 我问这是因为此脚本的'3.2.1'版本是必需的,并且在'空脚本标记'版本中也等于'3.2.1' Actual theme path?ver=3.2.1 If you answered 'no' to the previus question, 如果您对之前的问题回答“否”,
Is jQuery library script included? 是否包含jQuery库脚本? It could be the reason because according to this 这可能是因为根据此

wp_enqueue_script('nivo', BFI_TEMPLATEURL . 'scripts/jquery.nivo.slider.js', array('jquery'),'3.2.1');

nivo slider script depends on jquery script. nivo滑块脚本取决于jquery脚本。

Also, Have you opened header.php-file of your theme? 另外,您是否打开了主题的header.php文件? Maybe you have this string hardcoded in this file. 也许您已将此字符串硬编码在此文件中。 It is improbable, but may be... 这是不可能的,但可能是...

Deactivated or deleted? 停用或删除? Because if you deactivate the plugin, the script files are still in the root js directory of wordpress. 因为如果停用插件,脚本文件仍位于wordpress的js根目录中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM