我为jquery网站制作插件,我使用google jquery,因为我正在使用代码
/*add_action( 'init', array( $this, 'include_jquery' ) );
function include_jquery(){
wp_deregister_script('jquery');
wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"));
wp_enqueue_script('jquery');
}*/
但是它与我的头文件 jquery 的宽度发生冲突,所以我该怎么解决它
最佳答案
只需将 jquery 添加到主题的 header.php 文件中的 head 标记之间即可
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
关于php - WordPress 插件中的 jquery 冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13320032/