我已经阅读了关于使用wp_enqueue_style
而不是@import
. 我是个新手,完全不知道如何使用这个。
我的主题是athletica,我的孩子的主题是athletica child。我是否在wp_enqueue_style
密码我不确定代码中需要替换哪些文本(如果有):
<?php
add_action( \'wp_enqueue_scripts\', \'enqueue_child_theme_styles\', PHP_INT_MAX);
function enqueue_child_theme_styles() {
wp_enqueue_style( \'athletica-style\', get_template_directory_uri().\'/style.css\' );
wp_enqueue_style( \'child-style\', get_stylesheet_uri(), array(\'athletica-style\') );
}
此外,我还看到了关于您的父主题是否使用wp_enqueue_style
在它的功能中。php文件。是我的!现在我该怎么办?