Skip to content
Advertisement

Include jQuery Core in Theme Folder and Enqueue to Footer

I have used the below for many years to move jQuery to the footer.

JavaScript

But instead of loading the version shipped with WP (or ClassicPress too) I will download the latest version here https://releases.jquery.com/jquery/ to my theme folder.

So how do I now change the wp_register_script above to call a local version like ‘assets/js/jquery-3.6.1.js’?

Haven’t been able to find any solutions to load jQuery from my theme, only from Google etc which then creates problems for performance.

Thanks in advance.

Advertisement

Answer

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement