Jump to content

- - - - -

Page Specific CSS

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1 tsalstrand†



  • DMS Subscriber†
  • 255 posts

Posted 08 August 2012 - 03:47 PM

Currently I'm putting all my custom CSS into the child theme's style sheet or occasionally putting it in the "custom code" area. Both work fine for site wide changes, however when I have to make a change to a specific page, it'd be nice to actually make that change on that page's "edit side."

Somewhat similar to how we can add a page specific background image on that page in question, it'd be nice to have a "custom code" section so that I don't have to comment out the style sheet (like below) because I can't remember what each post ID goes with on a 70+ page site :-)

It would help a lot with design teams made up of multiple designers working on one project.

 /*BEGIN Home page CSS specific code*/
	body.page-id-17 .textwidget { background: white; box-shadow: 2px 2px 2px #bababa;}
	/*END Home Page specific CSS code*/

#2 catrina



  • Members
  • 12345 posts

Posted 08 August 2012 - 05:09 PM

Thanks for the suggestion. I can't say whether or not this feature will be added, but it's much easier to find the post ID and apply it the CSS (which is already what you're doing). You can find the IDs easily by following these instructions: http://tutzone.net/h...s-in-wordpress/ (easier than having to view the source). If each page had its own stylesheet, I think site performance would be affected negatively. If there are too many stylesheets on a single site, that increases the number of http requests needed to load the page and that can cause your site to slow down.

#3 tsalstrand†



  • DMS Subscriber†
  • 255 posts

Posted 08 August 2012 - 07:59 PM

Catrina, Considering that its my goal to get every site I work on under 1.5s load times, I'm surprised I didn't think of that! Excellent point and I agree with you 100%. Oh, you might like the plugin "WP Show ID"... it allows you to see all your post IDs at one glance, taking a lot of steps out :)