Enqueue stylesheets in child theme
-
Hi,
I have noticed I should not use the @import to include the parent stylesheet. I should enqueue it in child theme file functions.
function child_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } add_action( 'wp_enqueue_scripts', 'child_styles' );
But today I found out you should enqueue the child theme stylesheet as well. My site looks fine without this (child styles are loaded) so I am wondering why I should enqueue this too?
Guido
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Enqueue stylesheets in child theme’ is closed to new replies.