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