WordPress.org

Support

Support » Themes and Templates » [Resolved] How to use different header.phps vor different pages?

[Resolved] How to use different header.phps vor different pages?

  • Sascha Rossaint
    Member

    @sascha-rossaint

    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • wizardregis
    Member

    @wizardregis

    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'); ?>

    Sascha Rossaint
    Member

    @sascha-rossaint

    Thanks a lot,
    resolved! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] How to use different header.phps vor different pages?’ is closed to new replies.