WordPress.org

Forums

[resolved] How to use different header.phps vor different pages? (3 posts)

  1. Sascha Rossaint
    Member
    Posted 6 years ago #

    Hi there,
    does anyone know how i can
    use different header.php files for
    different pages?

    For page.php it works with simply duplicating and naming it to page-#id.php.
    With header.php however it doesnt.

    Cheers folks and happy new year
    Sascha

  2. wizardregis
    Member
    Posted 6 years ago #

    If I understood it correctly...

    On top of each page should be be a

    <?php get_header(); ?>

    On the pages you want to use another header, remove that code and use this:

    <?php include (TEMPLATEPATH . '/anotherheader.php'); ?>
  3. Sascha Rossaint
    Member
    Posted 6 years ago #

    Thanks a lot,
    resolved! :-)

Topic Closed

This topic has been closed to new replies.

About this Topic