我知道这个话题已经过时了,但我还是有一些问题。我使用elementor子主题并尝试将以下样式表排队
hello子主题文件夹:样式。css:样式。css
function hello_elementor_child_enqueue_scripts() {
wp_enqueue_style( \'hello-elementor-child-style\', get_stylesheet_directory_uri() . \'/style.css\', [\'hello-elementor-theme-style\',],\'1.0.0\');
wp_register_style( \'test\', get_template_directory_uri() . \'/assets/css/style.css\' );
wp_enqueue_style( \'test\' );
}
add_action( \'wp_enqueue_scripts\', \'hello_elementor_child_enqueue_scripts\' );
我尝试了以下几种方法:
How Can I Use A Child Theme Effectively When Parent's CSS Is Located in a 'CSS folder'?如果使用此标准,我的页面将变为空白:
add_action( \'wp_enqueue_scripts\', \'theme_enqueue_styles\' );
function theme_enqueue_styles() {
wp_enqueue_style( \'parent-style\', get_template_directory_uri() . \'/style.css\' );
}