Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

SIngle vs multi style sheets and js files

In WordPress which would be better to do. less style sheets and JavaScript files or more as you sometimes have one just for Slider etc or should you merge that into the main one?

1 Answer

Kevin Korte
Kevin Korte
28,149 Points

The fewer the better. Less requests on server load. Other things you can do is conditonally load a style sheet only when it's needed. (i.e. if a get variable is set).

However, don't be afraid to have more than one CSS or JS file. Just keep in mind your sites performance every time you add another file to be called.

Another active thread very similar to yours.

https://teamtreehouse.com/forum/creating-my-first-website-how-many-css-files