This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Reply To: Multiple stylesheets in one theme

Jason Bobich

Sure, you could have different styles based on the current page. There are two overall approaches you can take that I can think of.

1) You could do it server-side by enque’ing whatever stylesheet based on some parameter, possibly a WordPress conditional. —

2) Or even without enque’ing any additional CSS files, you can style different pages from your style.css by simply utilizing the body classes the theme and WordPress give you.

For example, on every page on your site WordPress gives you a unique class attached to the body based on the current page that is page-id-{page_id}.

.page-id-123 .thing-1 { ... }
.page-id-123 .thing-2 { ... }
.page-id-123 .thing-3 { ... }