Theme Author
Tom
(@edge22)
Hi Susan,
It looks like you have this line in your child theme:
@import url(“../generatepress/style.css”);
This is loading the stylesheet a second time, causing some old CSS to be read instead of the correct custom CSS.
If you remove that line from your child theme, you should be good to go 🙂
Tom, thank you for that. Removing that line from the child theme css corrects the drop down positioning problem.
However, WordPress says that that line of code should be the first line of code in a child theme css file.
??
,Susan
Theme Author
Tom
(@edge22)
Using @import is an old way of creating child themes that actually isn’t very efficient.
GP does this step for you in a more efficient way that doesn’t hurt performance 🙂
Oh, good!
How does GP do that?
Theme Author
Tom
(@edge22)
Detects if you’re using a child theme and includes the parent theme style.css if that’s the case 🙂
I was using something like this:
function theme_enqueue_styles() {
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'));
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 30);
And I was getting the same problem. I have been using that technique for creating child themes for other themes. But GP makes this a lot easier. The more I use this theme, the more I want to make it my only parent theme ever. Thank you.
Theme Author
Tom
(@edge22)
No problem! Simple is good 🙂