jQuery to header
-
Hello,
I am in a big problem (at least that’s the way I see it). I’ve tried plenty of times to move WordPress to wp_head() instead of wp_footer(), but it simply doesn’t work. When I try to add a script to wp_head(), it doesn’t show up either. Here is the code I used in theme’s function.php:
if (!is_admin()) add_action("wp_enqueue_scripts", "jquery_to_top"); function jquery_to_top() { wp_deregister_script('jquery'); wp_register_script('jquery', "//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js", false, null, false); wp_enqueue_script('jquery'); }
So based on the Codex, this should the jQuery script to wp_head(). But it doesn’t.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘jQuery to header’ is closed to new replies.