Generic Banner specified in CSS
-
Hi
I am trying to have a banner appear, only when on certain pages. The code I am currently using is:
<div <?php if (is_page(’emotional-wellbeing’)) {?>class=”lookhere emotionalwellbeing”<?php } ?>></div>
<div <?php if (is_page(‘healthy-eating-exercise’)) {?>class=”lookhere healthyeating_exercise”<?php } ?>></div>
<div <?php if (is_page(‘general-health’)) {?>class=”lookhere generalhealth”<?php } ?>></div>So there are 3 conditions. What I need is another condition that states that if the page is anything other than these pages, there will a be different class used (and therefore a generic banner will be displayed).
Sorry for asking a php newbie question, but this has been frustrating me for hours!
The topic ‘Generic Banner specified in CSS’ is closed to new replies.