style.css in my child theme folder:
/*
Theme Name: Vantage Child
Author: SiteOrgin
Template: vantage
Version: 1.0.0
*/
@import url(“../vantage/style.css”);
/* =Theme customization starts here
————————————————————– */
I’ve also created functions.php in my child theme folder:
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_theme_styles' );
function enqueue_theme_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style', get_stylesheet_uri(), array( 'parent-style' ) );
}
But firefox still can't load child theme's css, but Chrome does.
Please, help me fix this problem :)
Thank you in advance !
Hi Tin
You’ll need to either import the parent stylesheet via CSS @import OR via the functions file, but not both. Importing via the functions file and enqueuing your new stylesheet would look as follows:
I’ve pasted your code into my child’s function.php and removed @import url(“../vantage/style.css”);
Chrome & Safari can load the child theme’s css file but Firefox and IE can’t.
Could you please inspect into my site congtydietmoi.com.vn to figure it out.
Thanks Andrew in advance,
Hi Tin le,
I’m working with firefox. I’ve also a vantage-child with style.css, like you.
Without functions.php, it works well.
Try perhaps to remove functions.php to see how it works…
Cordially