Combining Stylesheets - Excessive Stylesheets in Theme Folder

Hello! I’ve been in web admin for 8yrs but just started into wordpress web design this past year. My very 1st site was my own and I didn’t know much back then. I purchased a multi-purpose theme from ThemeForest, which I love, however it came with 19 stylesheets, plus plugins’ stylesheets of course, and my child theme.

I’m now at around 27 stylesheets!!

The stylesheets that came with the theme are mostly located in a CSS folder inside the parent theme’s folder and 11 of them are just for icons.

If I at least combine the 11 icon-font stylesheets into 1 stylesheet, the next time the theme updates, will they all just get added back?

I had been studying this tutorial on combining CSS, but does anyone have any other tutorial recommendations? https://speedrak.com/how-to-combine-css-stylesheets-wordpress/

Thank you!

the best way to combine them is via a function, this can be done with most caching plugins or the Autoptimize plugin.

The reasons for this is that it doesn’t change the theme files so is future compatible, if you combine them manually, you would need to edit the dequeue functions to disable the stylesheets you have moved.

3 Likes

Thank you so much! I had looked into that plugin and I’m not sure what it was that steered me away. I’ll definitely revisit it!