WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] How can I use a different header & footer file for just the homepage?

[Resolved] How can I use a different header & footer file for just the homepage?

  • Hello,
    I am setting up a clients site using WordPress, but for the homepage I need to use a different header and footer file from the rest of the site.

    What is the best method for setting this up?

    Thanks in advance,
    Adam

Viewing 2 replies - 1 through 2 (of 2 total)
  • Take a look at Conditional Tags to help you.

    <?php
    if (is_home() ) {
    get_header('myheader'); // include header-myheader.php
    get_sidebar('xyz'); // include sidebar-xyz.php
    } else {
    get_header();
    get_footer();
    }
    ?>

    Great,
    I will try that when I get in the office tomorrow morning!

    Thanks for your help.
    Adam

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] How can I use a different header & footer file for just the homepage?’ is closed to new replies.