I am developing a site that must be HTTPS secure and WordPress is loading <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
at the very top of my page, before <html>
and giving me an insecure error. I cannot find where this is being loaded from to prevent it from loading.
Unfortunately I cannot show the site as it’s a federal credit union site and it would be against our contract agreement for me to present this site publicly before it is complete.
Here’s a screenshot of the issue via Chrome web dev tools (click to zoom):
When I build themes, I also like to make the WordPress header as clean as possible and then reconstruct it to my own liking. The code below is excessive for your question, but it might help you with other ‘WordPress inserted code’ in the future. The key snippet of code you are looking for is
Put this in your
functions.php
file.My whole WordPress header cleanup:
You can also download the library from jQuery.com and load it as a normal script in your functions.php file and end
wp_enqueue_script
in atrue
statement, this prints the script just before the</body>
.WordPress still uses jQuery 1.something I believe. I pull jQuery separate because I’m using the latest version of bootstrap and want the lastest version of jQuery. Just remember to add true to your statement