I have a WP site that is setup using pages, rather than posts and it needs to be able to change the colour of the site based on the menu item selected. My menu looks more or less like this
<ul> <li>Widget 1 <ul> <li>Mod 1</li> <li>Mod 2</li> <li>Mod 3</li> </ul> </li> <li>Widget 2 <ul> <li>Mod 1</li> <li>Mod 2</li> <li>Mod 3</li> </ul> </li> </ul>
If the user clicks on any under Widget 1 then the site is blue, if they click on anything under widget 2 the site is green.
I was thinking of using
is_page( array( x, y, z ) ) but that won't update dynamically if I add new Mods so is not the most elegant solution. Do you guys know of a more elegant solution?
If it helps I am using a, heavily modified, thesis theme.
TL;DR: Change site colour based on page parent.