function uw_load_scripts() {
// De-register the built in jQuery
wp_deregister_script('jquery');
// Register the CDN version
wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js', array(),'','1.1', true);
// Load it in your theme
wp_enqueue_script('jquery');
}
add_action('wp_enqueue_scripts', 'uw_load_scripts');
我有这个很好的功能mytheme/function.php。他们说这应该将js移到页脚,但在我的情况下它不会。任何想法为什么或/和如何将其移动到页脚?WordPress的:jquery.js不会移动到页脚
有一个'the_footer()'挂钩在footer.php网页? Wordpresses用它来挂钩脚本。 – Broxzier
我有wp_footer(); before/body标签 – user2988759
'wp_footer()'在该位置包含文件'footer.php'。该文件是否包含'the_footer()'钩子? – Broxzier