WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This one should be easy for you guys. As the title says, I only want to change the color for pages and not posts.

I've tried this and some variations of it but no luck

.page h1 {color:#ED3709 !important;}
share|improve this question

closed as off topic by Wyck, kaiser, toscho Oct 3 '12 at 3:33

Questions on WordPress Development Stack Exchange are expected to relate to WordPress within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Doesn't matter, I'm an idiot, sorted it out now – Nick Mar 10 '12 at 0:09
does the body element of a page have class 'page'? – Stephen Harris Mar 10 '12 at 0:09
Post your solution please, in case others have the same problem :D. (After 24 hours, please accept it too to take it off the 'unanswered' pile :D) – Stephen Harris Mar 10 '12 at 0:13
The code was right but I didn't change the color; I copy and pasted the original h1 code from my stylesheet... it's been a long day. – Nick Mar 10 '12 at 0:17

I'll go ahead and answer it anyway. Assuming the theme is built right (I'll get to that in a second) .page and .single are applied to the <body> tag for pages and posts respectively.

In order to ensure those classes are applied, ensure the following template tag is used: <body <?php body_class(); ?> >

Then, the example you wrote should work correctly assuming your CSS cascades properly

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.