即时通讯寻找提高我的页面加载时间/排名和根据PageSpeed Insights ..问题是我的脚本/ css是很多渲染阻止。我怎样才能成功地使用wp_enqueue_script()来帮助我将脚本的大部分放入我的脚本而不是我的标题(wordpress)中。添加JavaScript和CSS到页脚
CSS例子
<!-- CSS -->
<link rel="stylesheet" href="<?php echo get_option('siteurl'); ?>/wp-content/themes/<?php echo get_current_theme() ?>/style-jquery-ui-1.8.6.custom.css" type="text/css" />
<link rel="stylesheet" href="<?php echo get_option('siteurl'); ?>/wp-content/themes/<?php echo get_current_theme() ?>/style-prettyPhotoCSS.php" type="text/css" />
脚本示例
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js?ver=3.7.1'></script>
改变输出放置在模板(S) – charlietfl
@charlietfl你能解释一下如何做到这一点?我从来没有在 –
之前做过这件事,你实际上想要的是头脑中的css,脚中的js。 – dandavis