WordPress: different CSS for different objects

Site:

body {
background-image:url(‘background.jpg’);
}

Single Page:

body.page-id-78 {
background-image:url(‘background.jpg’);
}

Several Pages:

body.page-id-78, body.page-id-79, body.page-id-82 {
background-image:url(‘background.jpg’);
}

Single Category:

.category-CatName {
background-image:url(‘background.jpg’);
}

Multiple Categories:

.category-CatName1, .category-CatName-2 {
background-image:url(‘background.jpg’);
}

Archive Pages:

.archive {
background-image:url(‘background.jpg’);
}

Custom Template, Post or Category:

.page-template-name {
background-image:url(‘background.jpg’);
}


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>