Forums
Home / Fixing WordPress / Fails to load jQuery script in the Footer
(@riversatile)
9 years, 11 months ago
Hi, I still don’t understand why my jQuery script is still loaded in my header section !
function update_jquery() { if (!is_admin()) { wp_deregister_script('jquery'); wp_register_script('jquery','/scripts/jquery-2.1.1.min.js','',null,true); wp_enqueue_script('jquery'); } } add_action('wp_enqueue_scripts', 'update_jquery');
This is what I checked :
Thanks for your support.
Well… By disabling all my plugins, I got jQuery script in the Footer section ! This means I probably have an extension which forces loading jQuery in the header section.
This behavior was caused by Collapse-O-Matic plugin.
I don’t know why, but save options in the “Collapse-O-Matic” settings has solved the issue !