Child Theme: style.css not firing
-
I have created a child theme of Penscratch-2.
The style.css file inside this child theme is not firing.
From what I’m reading, WordPress natively loads a Child CSS BEFORE a Parent CSS (which makes not sense to me insofar as I would supposed the whole point of the Child CSS is to override the Parent CSS), so you have to force enqueing in the Child’s functions.php. This I have done:
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' ); function my_theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_uri() ); }
Still no joy!
Anyone know how, in a Penscratch-2 environment, to get Child style.css to execute — and AFTER the Parent style?
Mark
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Child Theme: style.css not firing’ is closed to new replies.