Archived

This topic is now archived and is closed to further replies.

Page Specific CSS

3 posts in this topic

Posted · Report post

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*/

Share this post


Link to post
Share on other sites

Posted · Report post

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/how-to-find-post-ids-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.

Share this post


Link to post
Share on other sites

Posted · Report post

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 :)

Share this post


Link to post
Share on other sites