I have a child theme. Is its style.css loaded along with the parent theme? Or will I have to add this to function.php:
add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ );
function my_theme_enqueue_styles() {
$parent_style = 'parent-style'; wp_enqueue_style( $parent_style, get_template_directory_uri() . '/ style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/ style.css', array( $parent_style ), wp_get_theme()->get('Version') );
}
I would be grateful for your input.
Thanks.
- This topic was modified 3 months, 2 weeks ago by
mica123 .