Replies: 0
I have a custom theme which is built from the ground up.
In the theme, I include jQuery 1.11.1
I kept getting errors in my code and I discovered that from the wp_head() (down further) WordPress was loading another jQuery 1.11.0
The problem was the bootstrap required jQuery to be loaded before it and because wp_head() was loading another jQuery below bootstrap, it was throwing an error.
I have now moved wp_head() up the page, before bootstrap.js and this has fixed the problem
BUT….
This is a messy workaround – the pages is still loading jQuery twice, just in the order I need it now.
What I want to know is:
1. How is WordPress loading jQuery – Does WP load jQuery by default with no option to deactivate?
2. How can I stop this from happening – I built the theme from scratch therefore, I do not call it anywhere – i assume it’s a WP thing…
I tried using wp_deregister_script(‘jquery’); but that didn’t work because it appears that WP is loading jQuery without a handle (so the deregister can’t actually find it)
How can I control what wp_head() loads?