jQuery not working after moving WordPress site to

2019-03-03 13:18发布

问题:

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.

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.

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?

回答1:

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

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