Title: Google-loaded jQuery doesn&#039;t work in wp-admin
Last modified: August 19, 2016

---

# Google-loaded jQuery doesn't work in wp-admin

 *  [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * (@jusi)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/google-loaded-jquery-doesnt-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', 'http://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)

 *  [caugb](https://wordpress.org/support/users/caugb/)
 * (@caugb)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/google-loaded-jquery-doesnt-work-in-wp-admin/#post-1875870)
 * what is wrong with the embeded jQuery?
 *  Thread Starter [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * (@jusi)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/google-loaded-jquery-doesnt-work-in-wp-admin/#post-1875874)
 * I can’t make it to work with custom scripts in my theme. I register my scripts
   in functions.php, like this:
 *     ```
       wp_register_script('selectivizr', get_bloginfo('template_directory').'/_assets/js/selectivizr.js', 'jquery');
       wp_enqueue_script('selectivizr');
       ```
   
 * to have them included in `wp_head`. Then I use `wp_enqueue_script("jquery");`
   in my header.php BEFORE the `wp_head` but the jQuery is STILL loaded after my
   scripts anyway.
 * Registering Google-hosted version of jQuery forced it to load before my registered
   scripts to make them work properly. However it made the draggable menu items 
   in Appearance/Menus to stop working. Removing the `if(!is_admin())` condition
   fixes the menu problem, but the dashboard items don’t slide down then (there 
   is no jQuery on the page at all).

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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Justyna Ratajczak](https://wordpress.org/support/users/jusi/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/google-loaded-jquery-doesnt-work-in-wp-admin/#post-1875874)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
