Title: jquery from CDN
Last modified: September 18, 2018

---

# jquery from CDN

 *  [mica123](https://wordpress.org/support/users/mica123/)
 * (@mica123)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/jquery-from-cdn-2/)
 * Hello,
 * I hope you can help.
 * I need to load jQuery and jquery-form plugin from Cloudflare CDN into my WordPress.
   For this I need to insert these two lines:
 *     ```
       <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
       <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.2.2/jquery.form.min.js" integrity="sha256-2Pjr1OlpZMY6qesJM68t2v39t+lMLvxwpa8QlRjJroA=" crossorigin="anonymous"></script>
       ```
   
 * Once this is done, I would need to insert a script in a page that would use the
   jQuery – I wouldn’t know how to do this either.
 * I don’t have much experience with jQuery. I sincerely hope someone can help.
   
   Many thanks.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Abhishek](https://wordpress.org/support/users/abhiprep/)
 * (@abhiprep)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/jquery-from-cdn-2/#post-10699357)
 * Hello
    once you done insert these two line of Cloudflare CDN blow the <title>
   tag then u can run your jquery script in an script tag [More Information About jquery](https://www.w3schools.com/jquery/jquery_get_started.asp)
 *  Thread Starter [mica123](https://wordpress.org/support/users/mica123/)
 * (@mica123)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/jquery-from-cdn-2/#post-10699376)
 * Thank you so much. I am afraid that I am not sure where I should insert the lines?
   
   Do you mean on a page? And should the page have a title tag?
 * Sorry I am not really experienced.
 *  Thread Starter [mica123](https://wordpress.org/support/users/mica123/)
 * (@mica123)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/jquery-from-cdn-2/#post-10700513)
 * OK, I put the lines into the header.php below the <head> tag to get the jQuery.
 * I am puzzled – would it be possible for you to tell me what you meant by <title
   >
    tag? Or perhaps somebody else will – I sincerely hope so.
 * Also, how would I put a script tag related to the jQuery at the bottom of a single
   page?
 * Thank you.
    -  This reply was modified 7 years, 9 months ago by [mica123](https://wordpress.org/support/users/mica123/).
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/jquery-from-cdn-2/#post-10700995)
 * You don’t _have_ to have a title tag, but you really should, it controls what’s
   displayed in the browser title bar and can be significant in SEO. As long as 
   your script tags for the jQuery libraries are in the head section of the page,
   you’re good. There is an optimal placement strategy that’s a little complicated,
   but anywhere in head will work. Just be sure they occur before any jQuery code
   is referenced or used.
 * WP has its own version of jQuery local on your server that it uses by default.
   You must ensure the WP version and the Cloudflare version are not loaded on the
   same page, they will conflict with each other. The WP jQuery is mainly used on
   the back end, but many themes use it on the front end. There’s a workaround to
   get WP to use another version, but it’s a little involved. I can help further
   if need be, but it’s better to avoid the need to start with.
 * The script that uses jQuery must of course occur after the jQuery libraries are
   loaded. You can put the code in an external file that’s referenced much like 
   the libraries, or you can place the code within script tags right on the page.
   It can be placed on a template file, such as footer.php. It can even be placed
   in page content, using the editor’s text tab. If you place script this way, you
   need to remove any blank lines in the code. Otherwise WP will try to wrap your
   code in p tags, causing syntax errors.
 *  [Abhishek](https://wordpress.org/support/users/abhiprep/)
 * (@abhiprep)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/jquery-from-cdn-2/#post-10700996)
 * if you put your cnd link inside the <head> tag you doing great, if you wanna 
   add jquery code in some specific page so you need to install [styles n scripts plugin](https://wordpress.org/plugins/scripts-n-styles/)
   
   [for more information checkout how to use it.](https://youtu.be/O2jjZMgMbUs)
    -  This reply was modified 7 years, 9 months ago by [Abhishek](https://wordpress.org/support/users/abhiprep/).

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘jquery from CDN’ is closed to new replies.

## Tags

 * [jquery](https://wordpress.org/support/topic-tag/jquery/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [Abhishek](https://wordpress.org/support/users/abhiprep/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/jquery-from-cdn-2/#post-10700996)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
