Need help? Check out our Support site, then


Different headers on pages

  1. 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 !!

  2. Pleas head over to

    http://wordpress.org/support/

    We don't deal with WordPress' guts here.

Topic Closed

This topic has been closed to new replies.

About this Topic