Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Deregister Unknown jQuery Script WordPress



I'm using jQuery Mobile framework for building my wordpress website. I've nearly removed all unwanted scripts.

But their is just one more I need to remove - but I don't where it's coming from.

See below the contents of my wp_head

<script src='/wp-includes/js/l10n.js?ver=20101110'></script>
<script type='text/javascript' src=''></script>
<script src='/wp-content/plugins/gravityforms/js/jquery.json-1.3.js?ver='></script>
<script src='/wp-content/plugins/gravityforms/js/gravityforms.js?ver='></script>
<script src='/wp-content/themes/motorcyclelive-app/scripts/fr-mobile-wp.js?ver=3.1.2'></script>
<script src='/wp-content/themes/motorcyclelive-app/jqm/'></script>

The one I'm desperate to remove is the jquery-min which is loading from google. See below

<script type='text/javascript' src=''></script>

The only plugins that I am running are...

Gravity Forms
Clean up wp_head
Really Simple CAPTCHA

I have definitely deregistered the gravity forms jQuery by adding this in my functions...

add_action("gform_enqueue_scripts", "deregister_scripts");
function deregister_scripts(){
wp_deregister_script("jquery"); }

Any quick advice will be amazing.

Answers (3)


Jens Filipsson answers:

In you theme folder, locate and open the file <em>functions.php</em> in a text editor.

There you will probably find a line similar to this:

// Load jQuery
if ( !is_admin() ) {
wp_register_script('jquery', (""), false);

Remove it, and you will be good to go!

Josh Cranwell comments:

I'm really sorry all - I did not realize these expire so quickly - thanks Jens for your response. It was there.


Gabriel Reguly answers:


Seems to me that you are using <strong>Use Google Libraries</strong> plugin.

Are you sure that is not the case?

If you are running a multisite version of WordPress, it can be found under /wp-admin/network/plugins.php


Josh Cranwell comments:

Hi Gabriel, this is the code from my plugins.php in 'network'.

/** Load WordPress Administration Bootstrap */
require_once( './admin.php' );

if ( ! is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) );

require( '../plugins.php' );

How do you mean multisite? As in wordpress MU or just running 2 themes at the same time.

I just realised I'm also using this plugin.

WPtap Mobile Detector

This is the plugin I'm redirecting mobiles to my mobile theme.

I take it I'm not using '<strong>Use Google Libraries</strong>'?

Gabriel Reguly comments:

Hi Josh,

Multisite is the modern MU :-)

Anyway, why not remove jQuery before gravity forms?

As in

function my_init_method() { wp_deregister_script( 'jquery' );}

add_action('init', 'my_init_method');

It might be a solution.


Julio Potier answers:

I think this jquery-min is added by your theme. Which theme is it ?

Search in all php files of your theme for ""

Hope it helps