0

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

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. – JediTricks007 Sep 5 '15 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.