我已经搜索了一系列与此相关的问题,但并不准确,所以这里是:
我一直在一个网站上工作(不幸的是)在 WordPress 中使用三个不同的 jQuery 插件(索引上的图像轮播,投资组合页面上的图片库插件“Galleria”,联系我们页面上的自定义联系表 7)。
在一些帮助下,我已经能够消除它给我带来的大部分错误,但我现在只剩下最后一个了:
未捕获的类型错误:无法将属性“值”设置为 null
我已经把事情分开了,以便在 header.php 中调用以下内容:
<link href="http://www.cypresshilldevelopment.com/wp-content/themes/CHD2/galleria.css" rel="stylesheet" type="text/css" media="screen, print"/>
然后在 footer.php 中调用其余部分:
<script type="text/javascript" src="http://www.cypresshilldevelopment.com/wp-content/themes/CHD2/galleria_wp/js/jquery.galleria.js"></script>
<script type="text/javascript">
$ = jQuery;
$(function(){ $('ul.gallery').galleria({tempClass: 'active', thumbnail_caption: ''}); })
</script>
<!-- script for jQuery image carousel -->
<script type="text/javascript" src="/wp-content/themes/CHD2/js/jquery.cycle.all.min.js"></script>
<script type="text/javascript" src="/wp-content/themes/CHD2/js/jquery.easing.compatibility.js"></script>
<script type="text/javascript" src="/wp-content/themes/CHD2/js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="/wp-content/themes/CHD2/js/app.js"></script>
<!--[if lte IE 6]>
<script type="text/javascript" src="supersleight-min.js"></script>
<![endif]-->
我在这里做错了什么?我是否错误地拆分了代码?错误指向 WordPress 为定义 值的页面生成的代码中的一行wphc_value
,但在我的一生中,我无法在任何正在使用的 php 或 js 文件中找到对“wphc”的任何引用。