Adding class to home with php help

with the theme i’m using, it adds a class to all pages except the homepage.

here’s the code that’s in place in the header.php file:

<body <?php if(!is_home()) { echo ' class="innerpage"'; } ?>>

i’m not that handy with php but i think what this is saying is… if it’s not the homepage, then add the class of “innterpage”. But how do I make it also has code that says, if it IS the homepage, it has a class of “home”?

please advise. thanks in advance!

Try this code, with if() … else …

<body <?php if(!is_home()) { echo ' class="innerpage"'; } else { echo ' class="home"'; } ?>>

thank you!