小编Boo*_*gie的帖子

WordPress 在页脚中加载 CSS

我怎样才能让这个函数在页脚加载我的css而不是在头部加载谷歌页面速度。我已经用谷歌搜索并尝试过,但我似乎无法让它工作。

function broa_script_enqueue() {
    wp_enqueue_style('boostrapcss', get_template_directory_uri() . '/css/bootstrap.css', array(), '4.0.0', 'all');
    wp_enqueue_style('customstyle', get_template_directory_uri() . '/css/style.css', array(), '1.0.0', 'all');
    wp_enqueue_style('animatecss', get_template_directory_uri() . '/css/animate.css', array(), '1.0.0', 'all');
}

add_action( 'wp_enqueue_scripts', 'broa_script_enqueue' ); 
Run Code Online (Sandbox Code Playgroud)

wordpress performance footer

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

footer ×1

performance ×1

wordpress ×1