Different headers on pages
-
Hi! I want to use a different header for each pages, so i google’d and found this php code:
<?php if (is_front_page()) { ?>
<div id=”header”> <—- This is the Header id that i want on my Front Page
<?php } else { ?>
<div id=”<?php echo $post->post_name; ?>”> <—- This is my alternative header , based on the page title
<?php } ?>I replaced my headerdiv in header.php with this code but it just won’t work. Can’t see what i am doing wrong, i’m confident im not misspelling or anything and my stylesheet have the correspending div’s for my page titles also!
Btw i found it very strange there is so little info about this,i mean i can’t think of anyone using wp as an cms would use the same header for each page ?!
Please help i really need this one, Thanks !!
-
- The topic ‘Different headers on pages’ is closed to new replies.