Dynamic header problems with php
-
Hi i just want somebody to give me some help with a code im using on my website header which will create a unique picture for each page on the header im using this
PHP
<div id=”header” <?php if(is_page(‘About’)) : ?>class=”aboutpageclass”<?php else : ?>class=”normalclass”<?php endif;?>>
Css
.aboutpageclass { background-image:someimage.jpg; }
.normalclass { background-image:anotherimage.jpg }This code works perfect for my about page but i want to do the rest of the pages on my site like contactus, home, gallery and i have tried dubplicating the code , it did nt work and just change the name is there anybody can help me figure this out?? or what to add to this code so i can get dynamic header for all my pages on my site , thank u in advance
- The topic ‘Dynamic header problems with php’ is closed to new replies.