PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Load google jquery api

  1. Hi.
    After reading your post today, I have become unsure of the way I load jquery in my themes. (By the way, I tried to post a comment on that page, but my comment was not submitted).
    I have always loaded jQuery from Google's API, because I wanted to use the latest version at the time of developing the site, plus I thought there were some speed advantages in doing so. I might be very wrong. :-)

    This is how I do it:

    add_action( 'wp_enqueue_scripts', 'load_javascript_files' );
    * Load scripts
    function load_javascript_files() {
    	if (!is_admin()) {
    		wp_register_script('jquery', '', false, '1.7.2', false);

    Do you advice not to do this or what is your opinion on this method?


    Posted 12 years ago on Tuesday May 8, 2012 | Permalink
  2. I just saw that Carl answered this indirectly in a thread on another site here:

    Thank you Carl for elaborating on this. It makes a lot of sense. I never thought of the complications it can cause.


    Posted 12 years ago on Wednesday May 16, 2012 | Permalink