WordPress.org

Ready to get started?Download WordPress

Forums

different page, different header image (4 posts)

  1. jonathanmorgan
    Member
    Posted 8 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.

    Cheers.

  2. ladydelaluna
    Member
    Posted 8 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
    Member
    Posted 8 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
    Member
    Posted 8 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

Tags