title: WordPress wp_register_script function not loading script in footer
body: <p>I am trying to load JQuery hosted on Google in my blog's footer just before the body finishes. This is the function I am using in my functions.php file.</p>
  
  <pre><code>function load_jquery() {
  if (!is_admin()) {
      wp_deregister_script('jquery');
      // load the Google API copy in the footer
      wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js', array(), '1.5.1', 1);
      wp_enqueue_script('jquery');
  }
  }
  add_action('init', 'load_jquery');
  </code></pre>
  
  <p>However it keeps being loaded in the header. I can't figure out why.</p>
  
  <p>I also added the following function in the functions.php file and it works fine;</p>
  
  <pre><code>function your_function() {
      echo '&lt;p&gt;This is inserted at the bottom&lt;/p&gt;';
  }
  add_action('wp_footer', 'your_function');
  </code></pre>
  
  <p>Appreciate the help.</p>