Title: body_class() function
Last modified: August 19, 2016

---

# body_class() function

 *  Resolved [thomaspayne](https://wordpress.org/support/users/thomaspayne/)
 * (@thomaspayne)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/body_class-function/)
 * Hello,
 * [http://quirm.net/2009/08/07/changing-headers-with-wordpress-body_class/](http://http://quirm.net/2009/08/07/changing-headers-with-wordpress-body_class/)
 * I’ve been working from the above link to try and colour code sections of [my site](http://thomasjwpayne.com/site).
   got it working on the ‘search’ class and the ‘blog’ class but cant seem to make
   it happen for individual pages. Specifically [this page](http://thomasjwpayne.com/site/?page_id=3)
   which is meant to have the same yellow background as the About menu section. 
   would be really grateful if anyone could give me some direction on this?
 * Thomas

Viewing 1 replies (of 1 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/body_class-function/#post-1586338)
 * have you tried
 * `body.page-id-3 #content {background: #123456; }`
 * individual pages have a class `.page-id-123` with `123` being the page ID

Viewing 1 replies (of 1 total)

The topic ‘body_class() function’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/body_class-function/#post-1586338)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
