WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] is it possible to have multiple header.php files for diff templates? (5 posts)

  1. sabster
    Member
    Posted 1 year ago #

    i made a new header.php file for another template that i have on my site, but i have no idea how to call it.

    right now i have:

    <?php get_header('headerpage.php'); ?>

    at the top of my custom template, but it keeps opening the original 'header.php' file. any ideas?

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    In these multiple header.php files, what do you want different from one another?

  3. potentweb
    Member
    Posted 1 year ago #

    Your supposed to name it header-{yourname}.php
    And it is <?php get_header('yourname'); ?> No .php hypen etc.

  4. sabster
    Member
    Posted 1 year ago #

    @andrew: i made a header template that has a slide show underneath the navigation. i guess i could've put it in to the page template, but i just made it in the header section instead.

    @potentweb: thank you !!!!!!!1 at first it wasn't working, but then i took the steps again and then it worked!!!! legit!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  5. potentweb
    Member
    Posted 1 year ago #

    No problem! Good luck.

Topic Closed

This topic has been closed to new replies.

About this Topic