I used Grunt to minify CSS then combine them together in my WordPress theme. I combined all the CSS into 1 file called main.css . However in order to register the theme I still need a style.css with theme comments. The issue is Grunt gets rid of comments. I would like to do achieve this in 1 http request vs 2. I would like to have all my css in style.css right below the theme comments and get rid of main.css. How can I accomplish this?
1 Answer
style.css
may contain only comment with Theme Name: ... . It just tells to WordPress about your theme. You have no need to load style.css in theme through tag <link ... >
.
So. Now you can leave your only one css file main.css
with all styles in <head>
.
-
Thank you so much. I just took out style.css from being loaded and my theme still works perfectly! Such a simple solution. Commented Sep 5, 2015 at 22:34