我的第一个WordPress主题从零开始。将样式表排队在functions.php文件中

我正在从头开始构建我的第一个WordPress主题, 并且设法将我的fantasia.css样式表加入了functions.php中。但是我也正在尝试使用WordPress排队方法添加normalize.css。样式表的加载顺序是什么?

<?php
function fantasia_style_enqueue() {
    wp_enqueue_style('fantasia', get_template_directory_uri() . 
    '/assets/stylesheets/css/fantasia.css', array(), '1.0.0', 'all');

    wp_enqueue_style('fantasia', get_template_directory_uri() . 
    '/assets/stylesheets/normalize/normalize.css', array(), '1.0.0', 'all');

}
add_action( 'wp_enqueue_scripts', 'fantasia_style_enqueue');
?>

#1


订单是你添加的订单。就你而言, 首先是幻想, 然后是正常化。你可能想要反向进行。

另外, 请记住, 你需要为CSS提供不同的”字符串句柄”。两者都有”幻想曲”, 因此将仅加载其中一个。

来源:

https://www.srcmini02.com/63717.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_37583.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?