WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

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

I'm trying with no luck to change the background color of just one page. I've tried adding > and then using the selector

body.page-id-15 #content { background-color:#000000; }

This doesn't work. Seems the only way I can change the background to that page is changing the background of #content. But...that changes all pages. I know this is possible and I've done it before. But not with this theme

Any ideas? The link the page in question is here http://gregtregunno.ca/news Thanks

share|improve this question
up vote 0 down vote accepted

Looking at your pages source, it does not have post/page ID's being added to the page's body class so you referencing something in your CSS that doesn't exist.

Try this rather (not sure what section you want changed):

body.blog {
    background-color: red;


body.blog #content {
        background-color: red;
share|improve this answer

You could put some conditional code in the header.php file that inserts a style into the header only for your specific page ID (15 in the example):

<?php if(is_page(15)): ?>

body.page {background-color: #FF0000 !important;}

<?php endif; ?>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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