different page, different header image (4 posts)

  1. jonathanmorgan
    Posted 9 years ago #

    I'm sorry if it sounds like I'm repeating a question that's already been asked, but I'm a relative Newbie to WordPress and PHP and haven't found a reply that, on my current level of knowledge, equipped me to do what I'm needing to do.

    I was wondering if someone could explain the easiest way to have different (specific - not random) header images on different pages in my website?

    I'm currently working on 2 sites which require this and am trying to figure out the most straight forward way of doing this without having unnecessary multiple page and header templates.


  2. ladydelaluna
    Posted 9 years ago #

    As far as I'm aware, the ONLY way to do that is with multiple page and header files... linking the specific header (header2.php) to the specific page template and then calling up that template when writing the page...

    Sorry I can't tell you what you wanted to hear! Maybe someone else can?

  3. jonathanmorgan
    Posted 9 years ago #

    I finally found my answer - it seemed like whatever I tried it failed to call up a different header. Then I realised that instead of the standard get_header call in the page file I needed to use the:

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

    call instead. It was actually in the wordpress documentation - in the Stepping Into Templates section...

  4. ladydelaluna
    Posted 9 years ago #

    Excellent! Thanks for sharing where you got the info from - this thread will be a help to others now in the future...

Topic Closed

This topic has been closed to new replies.

About this Topic