Hello,
I’ve created a child theme of Generate. The only content in style.css
is info about my child theme. In functions.php
I’ve added this code:
function rbt_styles() {
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/main.css'
);
}
add_action( 'wp_enqueue_scripts', 'rbt_styles' );
This loads my main.css
file, but the default Generate stylesheet is overriding all my child theme styles. I thought WordPress loaded the parent theme’s styles before the child theme’s? I understand Generate sees I’m using a child theme and loads its own styles automatically?
Do I need to load my child theme styles differently?
Thanks,
Leon