Hopefully it will be an easy question.
I created Wordpress template and now i would like to use that template for for several pages, however i would like to have different background color on some of the elements such as footer, header etc. that will be depending on parent. So lets say i have PARENT A (green background) and PARENT B (white background) now when i will create child of PARENT A i would like it to have green background automatically I know something similar could be done with posts using
<div class="post <?php foreach((get_the_category()) as $cat) { echo $cat->cat_name . ' '; } ?>"> </div>
I need some advice what would be the best way to do that.
I hope it makes sense, sorry if i made it confusing.
Many thanks,