How to Load jQuery from Google in WordPress and Thesis

by Thomas Griffin on June 19, 2010

In this video tutorial, I will be showing you how to load jQuery from Google by simply copying and pasting some code into your functions.php file (a little different for Thesis – will be covered below). Watch the video below to learn how to do just that. The code and steps are listed below the video for further instruction.

Manual Instructions

1. Copy the following code to your clipboard:

if( !is_admin()){
	wp_deregister_script('jquery');
	wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"), false, '1.3.2', true);
	wp_enqueue_script('jquery');
}
*Remember that the fifth parameter ‘true’ causes the script to load in the footer. If you decide to do this, make sure that your script is not adversely affected by it. If your script is affected, simply comment out the ‘true’ and the comma before it in order to have it load in the header.*

2. Paste that code into your functions.php file for your WordPress theme.

3. Save your functions.php file and reload your web page.

4. You are all done!

For WordPress Thesis Users

1. Copy the code below to your clipboard:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>

2. Paste that code into the “Additional Scripts” section in the Thesis Site Options menu.

3. Save your work and reload your web page.

4. You are all done!

Also, don’t forget that you need to change the numbers to whatever version of jQuery you are using. If it is not 1.3.2, change it accordingly in the code.

I hope this tutorial on how to load jQuery from Google in WordPress has been helpful for you! If you have any questions or comments, feel free to speak up below!

Be Sociable, Share!
SEO Blog Help | SEO Blog Tips For Beginners This article was written by Thomas Griffin.
You digging this theme? Me too. You should probably look into buying it very soon. Perhaps now would be a good time. If you want your mad theme desires to be satisfied, purchase Thesis here.
No, really. Be satisfied.

Leave a Comment

{ 1 trackback }

Previous post:

Next post: