<body <?php body_class(); ?>>
<?php if (is_front_page()){ ?>
<div class="page page-id-46 page-template-default custom-background">
<?php } else { ?>
<div id="main-inner">
<?php } ?>
put in header.php
Since you’re using the body_class() template tag, you already have all of the CSS selectors you need. Just add the appropriate CSS definitions.
For a page with an ID of 46, you can target: body.page-id-46 in your CSS.
Thanks for your replies…
Sorry, I’m not quite following what you mean. I have copied the code provided by mukesh27 into the header.php section. However the background image still hasn’t changed. Should I be putting the image URL in somewhere?
Chip is more correct on this then mukesh
Add this to the end of your style.css file (or if you use theme companion or a child theme)
body.page-id-46 {
background: url('http://pathtowhereveryourimage.jpgis') repeat;
}
What this is saying, that on the body class, page-id-46 whatever page that is, change the background to that.
(of course change the http:// to your image you want to use as the background.)
So you’re pretty much identifying in the CSS what page it is and the change of the background.
I am sorry to be difficult. I appreciate the help so far. I must be missing something still. I have copied the code Frumph provided and put it in the Stylesheet (style.css). I changed the URL to the picture URL, so it looks like this:
body.page-id-46 {
background: url("http://www.brightideastech.ca/wp-content/uploads/2011/06/notepaper1-e1337293223308.jpg") repeat;
}
The full Stylesheet code looks like this:
[ One thousand, three hundred and forty-five (1,345) lines of code moderated. For more than 10 lines of code please use pastebin.com instead. ]
I have tried moving the code around inside the css document in case that it is in the wrong spot. However that doesn’t seem to change anything.
Thank you again!