After messing about with the new in footer parameter for adding scripts to WordPress I got quickly frustrated with the fact that for some reason it would not be added to the footer of my site. I even saw solutions about adding the src parameter which still did not work.
I played around for a while and finally got a solution working for me, check it out below.
wp_deregister_script('jquery'); wp_register_script('jquery', "/wp-includes/js/jquery/jquery.js", false, '', true); wp_enqueue_script('jquery');
- First of all we deregister the default jQuery script.
- Then we register our own jQuery script.
- Finally we then enqueue our new script into the page.
Hope this helps someone out, good luck with your websites!
Comments