combining CSS & Js into One File.
I am a pretty savvy person when it comes to WP but got stuck on this one. There are plenty of plugins that can accomplish this but I rather do it manually. I have multiple CSS and Js files on my WP theme and I want to be able to generate a one files and make it as the main one.
For example, for the CSS files I have a couple:
[ Moderator note: please wrap code in backticks or use the code button. ]
<link rel='stylesheet' href='website.com/style1.css' <link rel='stylesheet' href='website.com/style2.css' <link rel='stylesheet' href='website.com/style3.css' <link rel='stylesheet' href='website.com/style4.css' <link rel='stylesheet' href='website.com/style5.css'
How can I manually combine them to be like this:
<link rel="stylesheet" href="website.com/style1,style2,style3,style4,style5.css">
and then get ride of the one I have on the main page right now.
Same goes for .Js files as well.
There are plenty of tutorials but none of them is helpful. Thanks a lot for all your help and what you do.
- The topic ‘combining CSS & Js into One File.’ is closed to new replies.