将WordPress网站移至新域后,jQuery无法正常工作 [英] jQuery not working after moving WordPress site to new domain

查看:52
本文介绍了将WordPress网站移至新域后,jQuery无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是将网站移到了hostgator上的新域上,现在该网站的内容未显示.无法使用的网站是 http://alcaldarone.com ,而我开发并可以使用的网站是 http://atcjr.alcaldarone.com .

I just moved my site to a new domain on hostgator and now the site's content is not showing. The site that dosen't work is http://alcaldarone.com and the site that I developed with and works is http://atcjr.alcaldarone.com.

如果我在Chrome浏览器中查看问题站点并刷新首页,则可以看到内容闪烁了片刻,然后消失了.我认为问题在于jQuery无法加载.出现Blog页面内容,但jQuery幻灯片功能均未执行.

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. I think the problem is that jQuery is not loading. The Blog page content appears but the jQuery slide function isn't executing either.

我已经遍历数据库并更改了wp-options中home和siteurl的URL设置,以指向alcaldarone.com,并且对wp-posts表中的记录进行了相同的操作,但是还是没有运气...任何想法?

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?

推荐答案

好,我发现了这一点.由于某种原因,我的jquery-ui.min.js没有被加载.我刚刚打电话给

Ok I found this. For some reason my jquery-ui.min.js was not getting loaded. I just called

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

代替

<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..

这篇关于将WordPress网站移至新域后,jQuery无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆