Including latest jQuery Library to your WordPress Site

First off, the basic code. This would go into your header.php. I put it directly above the

<?php wp_head(); ?>

call. If you don’t have that in your theme, you have bigger issues, as it is vital. Check out the info on that. The code looks like this:

<?php
wp_deregister_script('jquery');
wp_register_script('jquery', 'http://code.jquery.com/jquery-1.8.2.min.js');
wp_enqueue_script('jquery');
?>

That’s it really. That’ll deregister WordPress’ jquery and start using Google’s.

About these ads

Posted on February 8, 2013, in Web Dev and tagged . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 27 other followers

%d bloggers like this: