Support » Fixing WordPress » Custom page headers?

  • I am using separate pages on my site. I would like to change the header image on each page. I have looked for a plugin but only found random header image changers. Does any one now how I can swap between header images.

Viewing 5 replies - 1 through 5 (of 5 total)
  • That’s pretty easy. Make the changes you want to header.php and save it under different names, like header1.php, etc. You can add a different image to each header, for example.

    Next, save page.php under different names (page1.php eg) and modify the call to the header in each new Page template so it says:

    <?php include(TEMPLATEPATH . '/header1.php'); ?>

    and so on. Also insert in each of the new pages some code like this — right at the top of the page:

    <?php
    /*
    Template Name: Page 1 template
    */
    ?>

    etc.

    Then when you create or edit pages you can select the appropriate page template from the drop down list on the Write Page page. You’ll see “Page 1 template” etc in the drop-down list. And when you publish the pages you’ll have different headers on each of them.

    Thread Starter flipper26

    (@flipper26)

    I have followed your advise but I am not getting consistant results? I have created a new style sheet and new header file for each section. I have then assigned the a new set of page templates to each section page?

    The template changes are been picked up but the haeder image is not working?

    “not getting consistent results”

    “header image is not working”

    I’m afraid neither of these statements contains any information that would help someone to offer you help in turn. You’ll have to be most specific about what’s inconsistent and in what way your header image isn’t working. And a link to your blog would be helpful so we could see for ourselves what’s going on.

    I understand creating a new page template by adding: the code

    <?php
    /*
    Template Name: Page1
    */
    ?>

    but is this….

    <?php include(TEMPLATEPATH . ‘/header1.php’); ?>

    adding in the new page1.php file? If so, where?

    Also what code do you change in the header.php to create a new header1.php? I could not find anything code referencing a specific template or image file in the header.php

    Can you help! I’m just so glad you can change the header in every page. That’s exactly what I need!

    Kathi

    Please someone help!

    I don’t want to start another string – but I need to get someone’s attention! I really would like to use a wp template but I need each page to have a different image. How do I make the page template call up a different header image?

    I’m using the

    reds-10 template

    link: http://www.plainlycreativeworks.com/wordpress/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom page headers?’ is closed to new replies.