• Resolved adam533

    (@adam533)


    Hello everyone.
    I am new to WordPress but have been working on it all day and have been amazed at what it can do.

    I wanted to know if it was possible to use a different header.php file for just the home page? My header.php file has a line of jquery that is pulling 10 images from my flickr account to be displayed on the homepage. The only thing is that it try’s to load those same 10 images on all the other pages also because of the header file. You can see in the status bar that after the page is loading it is still contacting flickr.com. I would like to have that one line (which has to be in the header) to only be used for the homepage.

    I have searched for an answer without success but hopefully someone here can point me in the right direction.

    Thanks in advance.
    I look forward to asking (and hopefully soon answering) many questions on this forum…I am sure I will have many to ask for a little bit ??

    Adam

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can conditionally load the code. To load it only on the top page

    <?php if (is_front_page()) { ?>

    ======= put jQuery code here =========

    <?php } ?>

    Thread Starter adam533

    (@adam533)

    Great!
    I am going to do that this morning.

    Thanks for your quick response too

    Adam

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Use different header.php for just one page?’ is closed to new replies.