The WordPress codex says:
$in_footer
(boolean) (optional) Normally scripts are placed in the section. If this parameter is true the script is placed at the bottom of the . This requires the theme to have the wp_footer() hook in the appropriate place. Note that you have to enqueue your script before wp_head is run, even if it will be placed in the footer. (New in WordPress 2.8) Default: false
So I added true
after each script's src path
:
/**
* JavaScript
*/
function my_scripts_method() {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js', true );
wp_enqueue_script( 'jquery' );
}
add_action('wp_enqueue_scripts', 'my_scripts_method');
function media_queries_script() {
wp_register_script( 'mediaqueries', get_template_directory_uri() . '/js/css3-mediaqueries.js', true );
wp_enqueue_script( 'mediaqueries' );
}
add_action('wp_enqueue_scripts', 'media_queries_script');
function custom_script() {
wp_register_script( 'custom', get_template_directory_uri() . '/js/custom.js', true );
wp_enqueue_script( 'custom' );
}
add_action('wp_enqueue_scripts', 'custom_script');
function replace_script() {
wp_register_script( 'replace', get_template_directory_uri() . '/js/jquery.ba-replacetext.min.js', true );
wp_enqueue_script( 'replace' );
}
add_action('wp_enqueue_scripts', 'replace_script');
But the scripts are still being included in the header.
Any suggestions to fix that?