WordPress comes pre-loaded with jQuery. But it’s not likely to be the most recent stable version. Fortunately, it’s not difficult to make sure you always have the most recent version loading.

In the functions file of your theme folder, you likely have an area where you’ve enqueued a bunch of scripts and styles. There are a couple of different formats for doing this. Mine works well for when you have quite a few scripts and stylesheets to load on different pages.


function my_scripts() {
     if(!is_admin() {
          wp_deregister_script('jquery');
          wp_enqueue_script('jquery', '//code.jquery.com/jquery-latest.min.js');
     }
}
add_action('wp_enqueue_scripts', 'my_scripts');

Let me know how it works for you, or if you have another way of doing this.

thePixelPixie.com - WordPress boutique

Subscribe and receive my FREE eBook


4 MISTAKES You’re Making on Your Website that are Costing You MONEY!

  • This field is for validation purposes and should be left unchanged.

The Author

Save

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Ready to chat about how ThePixelPixie can help?