Child theme import – import function versus enqueue
-
Hi Alexander
I have just installed the child theme to Hueman, and in the css the @import url function is preset.
I have been reading a lot of posts and texts about this function and as far as I can understand it is better to use the unqueue function.
In the child theme I have deleted the @ import function and instead I have put the below code into the functions.php file.
I have made a little test and it works fine – so far. Will this be an ok way to connect the child theme to the parent theme.
add_action( ‘wp_enqueue_scripts’, ‘enqueue_parent_theme_style’ );
function enqueue_parent_theme_style() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ );
}Thanks in behorehand and very thank you for a great theme
- The topic ‘Child theme import – import function versus enqueue’ is closed to new replies.