Tagged: child theme, CSS, custom, custom.css, enqueue, php, style, style.css
Hi,
I already have a style.css file in my child theme folder to add CSS to. This works well.
But I saw this in your documentation:
Enqueue custom CSS
Assuming you have installed the child theme, which is always recommended for any custom modifications. We will enqueue a custom CSS file called my_custom.css
Steps to add a custom CSS file.
1. Create your custom.css file.
2.Create a new folder called “css” in child theme root directory and place your “my_custom.css” file in wp-content > themes > enfold-child > css > my_custom.css
3. Add the below code to your functions.php file…
What’s the difference between using the style.css file in my child theme folder which was already there or making a /css folder and putting my_custom.css file in there and enqueuing it with PHP?
Thanks.
Hey Cordell,
The documentation is outdated – your way (adding the code to style.css) is the recommended and best way. I’ll ask Kriesi to update the docs.
Best regards,
Dude
Hey Dude,
Ok cool. Much appreciated.
Thanks.
Hey!
Glad we could help you :)
Regards,
Peter