Tagged: child theme, enfold, style.css, yigit
Hi,
The style.css of my child theme is functioning but i’d really like to copy multiple stylesheets from the parent folder into the child folder and make my edits to those instead but they ain’t working. Any advice on how I can get them to override their equivalents in the enfold parent folder?
Thanks,
Thomas
Hey thomashutton!
I checked your functions.php file and it is empty. Please refer to this post – https://developer.wordpress.org/reference/functions/wp_enqueue_style/ and enqueue your stylesheet
Regards,
Yigit
Thanks for this Yigit.
I had tried adding something like this but perhaps i’m getting the code wrong.
If I wanted to add the base.css how should I configure this code?
Sorry if this is straightforward (my html is a bit limited).
Thanks again.
Hey!
I moved your base.css file into CSS folder and enqueued in functions.php file. Please review your website now
Cheers!
Yigit
Cheers for that Yigit, it’s really helpful. My edits for base.css still don’t seem to be working though : (
Hey!
Please try adding !important rule to your codes as following
.your-code { color: red !important; }
Regards,
Yigit
Yeah unfortunately the site isn’t responding to it. The parent is still coming out on top!
Hey!
I strongly recommend not to link more than one CSS file in child theme as it will create more http request and takes longer to load.
Instead use SASS in your development environment to organise your CSS and compile it to one file.
You can also check this link here for more ways to include multiple CSS files
https://wordpress.org/support/topic/how-to-add-multiple-css-files-in-your-wordpress-theme
Cheers!
Vinay Kashyap