wordpress媒体库在我将其放入我的子主题的functions.php中后不会加载任何内容:
function custom_manage_styles_and_scripts() {
wp_register_style( 'custom-style', get_stylesheet_directory_uri() . '/css/custom-style.css', false, '1.0.0' );
wp_enqueue_style( 'custom-style' );
}
add_action( 'wp_enqueue_scripts', 'custom_manage_styles_and_scripts', 99 );
?>
css子文件运行良好。
有什么想法吗?
如果只对样式进行排队,会发生什么?像这样:
function custom_manage_styles_and_scripts() {
wp_enqueue_style( 'custom-style', get_stylesheet_directory_uri() . '/css/custom-style.css', false, '1.0.0' );
}
add_action( 'wp_enqueue_scripts', 'custom_manage_styles_and_scripts', 99 );