我有这个子主题,当我把 CSS 放在那里时它不会改变。另外,我有这个 CSS 插件,我必须使用,但我在所有东西中都使用了 !important 这个词,我知道这不是很好的做法。我的functions.php文件有错误吗?
if ( ! function_exists( 'WebCrawlerSites_enqueue_child_styles' ) ) {
function WebCrawlerSites_enqueue_child_styles() {
// loading parent style
wp_register_style( 'parente2-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'parente2-style' );
// loading child styles
wp_register_style( 'childe2-style', get_stylesheet_directory_uri() );
wp_enqueue_style( 'childe2-style' );
}
}
add_action( 'wp_enqueue_scripts', 'WebCrawlerSites_enqueue_child_styles', PHP_INIT_MAX );