简体   繁体   English

将WordPress网站移至新域后,jQuery无法正常工作

[英]jQuery not working after moving WordPress site to new domain

I just moved my site to a new domain on hostgator and now the site's content is not showing. 我只是将网站移到了hostgator上的新域上,现在该网站的内容未显示。 The site that dosen't work is http://alcaldarone.com and the site that I developed with and works is http://atcjr.alcaldarone.com . 不起作用的站点是http://alcaldarone.com ,与我合作并开发的站点是http://atcjr.alcaldarone.com

If I look at the problem site in Chrome and refresh the Home page, I can see the content flash for a split second then it disappears. 如果我在Chrome中查看问题站点并刷新首页,则可以看到内容闪烁片刻,然后消失。 I think the problem is that jQuery is not loading. 我认为问题在于jQuery无法加载。 The Blog page content appears but the jQuery slide function isn't executing either. 出现Blog页面内容,但jQuery幻灯片功能均未执行。

I have gone through the database and changed the URL settings for home and siteurl in wp-options to point to alcaldarone.com and did the same for records in the wp-posts table, but still no luck...any ideas? 我浏览了数据库,并更改了wp-options中的home和siteurl的URL设置,使其指向alcaldarone.com,并且对wp-posts表中的记录也做了相同的设置,但还是没有运气...有什么主意吗?

Ok I found this. 好的,我找到了。 For some reason my jquery-ui.min.js was not getting loaded. 由于某种原因,我的jquery-ui.min.js没有被加载。 I just called 我刚打电话

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js">

instead of 代替

<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery-ui.min.js"></script>

and that did it. 做到了。 The script probably got corrupted when moving the files.. 移动文件时脚本可能已损坏。

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

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