Google-loaded jQuery doesn't work in wp-admin
-
Hello, I’m using Google stored jQuery in my theme, calling it like this in my functions.php file:
function bb_google_jquery() { wp_deregister_script('jquery'); wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js', false, '1.4.4'); wp_enqueue_script('jquery'); } if(!is_admin()){ add_action('init', 'bb_google_jquery'); }
The problem is, even if though wrapped in the conditional tag – it stops wp-admin jQuery stuff (sidebar menu dropdowns, dashboard dropdowns) from working. Removing the
is_admin
makes it work correctly.However, I need it to be wrapped into the conditional tag, because otherwise I can’t move menu items around…
Anything I’m doing wrong with this code?
Thanks in advance
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Google-loaded jQuery doesn't work in wp-admin’ is closed to new replies.