admin管理员组

文章数量:1122832

I am fairly new to WP, so I apologize for this very basic question, but I am working on a site that has an older version of jQuery showing up.

Here is the jQuery reference I have placed in the header, which appears on line 20 of the source code:

<script src=".11.0/jquery.min.js"></script>

But on line 39 of the source code I see the following:

<script type='text/javascript' src='.4/jquery.min.js?ver=3.8.1'></script>

I have searched the files and I cannot see where this reference is coming from. I need to get rid of it and could therefore use some guidance on tracking it down. Thanks.

I am fairly new to WP, so I apologize for this very basic question, but I am working on a site that has an older version of jQuery showing up.

Here is the jQuery reference I have placed in the header, which appears on line 20 of the source code:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

But on line 39 of the source code I see the following:

<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js?ver=3.8.1'></script>

I have searched the files and I cannot see where this reference is coming from. I need to get rid of it and could therefore use some guidance on tracking it down. Thanks.

Share Improve this question asked Mar 14, 2014 at 14:15 forrestforrest 4833 gold badges7 silver badges16 bronze badges 2
  • 2 Is line 39 still located in the header? If 'Yes' check header.php for the file, Found it? 'No' -> check functions.php and look for an enquque_script function. Found it? 'No' -> try disabling all your plugins. These are the 3 things I would check. – Howdy_McGee Commented Mar 14, 2014 at 14:18
  • Hi Howdy_McGee, it was in the functions.php file. Please promote your comment to an answer so I can give you credit. Thank you! – forrest Commented Mar 14, 2014 at 14:24
Add a comment  | 

2 Answers 2

Reset to default 2
        Is line 39 located in the `<header></header>`?
                        /       \
                      Yes       No
                      /           \
                  Remove it     Check `functions.php` 
                                look for `enqueue_script()`.
                                Found it?
                                /       \
                              Yes       No
                             /            \
                        Remove it       Disable All Plugins.
                                        Is it gone?
                                        /     \
                                      Yes     No
                                      /         \
                                  Remove it     Re-search all
                                                Template Files.
                                                Found it?
                                                /       \
                                              Yes       No
                                              /           \
                                          Remove it      You're SoL

If you have access to the command line, you could try "cd"ing to the root of your website and do a recursive search, like this:

cd /var/www
rgrep -i "ajax\.google" * > /tmp/ajax-search.results

then

more /tmp/ajax-search.results

that found a few files that had "ajax.google" references in them. Its a good place to start

本文标签: javascriptI have an old version of jQuery showing up How do I figure out where it is coming from