Title: Plugin stops working when we remove theme default jquery
Last modified: August 21, 2016

---

# Plugin stops working when we remove theme default jquery

 *  Resolved [Gautam Doddamani](https://wordpress.org/support/users/gautam-doddamani/)
 * (@gautam-doddamani)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/plugin-stops-working-when-we-remove-theme-default-jquery/)
 * the social bar doesn’t float and doesn’t hide when we deregister the local copy
   of jquery from our theme…the code i am referring to is this…
 *     ```
       if (!is_admin()) {
           function site_init()
           {
               // remove jQuery
               wp_deregister_script('jquery');
           }
   
           add_action('init', 'site_init');
       }
       ```
   
 * p.s. i am using this code to remove the version of jquery which is present in
   my theme by default…i have manually added the google library version of jquery
   script.
 * why is it happening? i am already using google’s jquery right?
 * [http://wordpress.org/extend/plugins/floating-social-bar/](http://wordpress.org/extend/plugins/floating-social-bar/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Syed Balkhi](https://wordpress.org/support/users/smub/)
 * (@smub)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/plugin-stops-working-when-we-remove-theme-default-jquery/#post-3944615)
 * Need to see your site’s URL to answer the question.
 *  Thread Starter [Gautam Doddamani](https://wordpress.org/support/users/gautam-doddamani/)
 * (@gautam-doddamani)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/plugin-stops-working-when-we-remove-theme-default-jquery/#post-3944684)
 * my url is [revthatup.com](http://www.revthatup.com)…the plugin is deactivated
   for now. i do most of my testing on localhost syed…do you want me to activate
   the plugin on my live site so that you can take a look at it?
 *  Plugin Author [Syed Balkhi](https://wordpress.org/support/users/smub/)
 * (@smub)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/plugin-stops-working-when-we-remove-theme-default-jquery/#post-3944706)
 * Gautam, hard to tell what is going on.
 * It should work with Google jQuery unless it is not being loaded properly. Make
   sure that the Google jQuery is loading before our script. Also run the inspect
   element to see if any error is showing up in the console.
 *  Thread Starter [Gautam Doddamani](https://wordpress.org/support/users/gautam-doddamani/)
 * (@gautam-doddamani)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/plugin-stops-working-when-we-remove-theme-default-jquery/#post-3944709)
 * well i figured out what the problem was…thanks to you i did some researching 
   and what i found out was interesting…
 * whenever i used a script tag to load jquery such as this:
 * `<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script
   >`
 * the floating bar stopped working, but when i used wp_enqueue method, such as 
   this:
 *     ```
       function modify_jquery() {
       	if (!is_admin()) {
       		wp_deregister_script('jquery');
       		wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', false, '1.9.0');
       		wp_enqueue_script('jquery');
       	}
       }
       add_action('init', 'modify_jquery');
       ```
   
 * the floating bar started working…i don’t know what the problem was…i had heard
   somewhere that using the script tag is not the most effective way of loading 
   jquery. maybe you shed some light on this.
 * anyway i will mark this issue as resolved!
 *  Plugin Author [Syed Balkhi](https://wordpress.org/support/users/smub/)
 * (@smub)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/plugin-stops-working-when-we-remove-theme-default-jquery/#post-3944710)
 * Yes enqueue is the proper way of loading scripts to ensure plugin compatibility.
 * [http://www.wpbeginner.com/wp-tutorials/how-to-properly-add-javascripts-and-styles-in-wordpress/](http://www.wpbeginner.com/wp-tutorials/how-to-properly-add-javascripts-and-styles-in-wordpress/)
 *  Thread Starter [Gautam Doddamani](https://wordpress.org/support/users/gautam-doddamani/)
 * (@gautam-doddamani)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/plugin-stops-working-when-we-remove-theme-default-jquery/#post-3944716)
 * Ahh…yes!! thanks that helps man.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Plugin stops working when we remove theme default jquery’ is closed to
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/floating-social-bar_f3f3f3.svg)
 * [Floating Social Bar](https://wordpress.org/plugins/floating-social-bar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/floating-social-bar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/floating-social-bar/)
 * [Active Topics](https://wordpress.org/support/plugin/floating-social-bar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/floating-social-bar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/floating-social-bar/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Gautam Doddamani](https://wordpress.org/support/users/gautam-doddamani/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/plugin-stops-working-when-we-remove-theme-default-jquery/#post-3944716)
 * Status: resolved