Support » Themes and Templates » New Page template does not work
7 years, 4 months ago
My new page template works fine with this call, <?php get_header(); ?> but not with this call (I get a blank Page), <?php get_header2(); ?>.
<?php get_header(); ?>
<?php get_header2(); ?>
I have renamed “header” to “header2” to test and once the name changes it does not work.
How do I get header2 to work? Do I need to add something to functions.php?
Does it need to be expressed a little differently? I only pose that as a question because I am not sure myself.
<?php get_header( $name ); ?>
Thanks Clayton, I used that from the codex as well putting the file name, header2.php where the $name was but it still brought up the default header.
I am now using a plugin for dynamic headers, http://nicasiodesign.com/blog/category/wordpress-plugins/. I probably should have done this right-off instead of wasting a rainy day.
This lets me change the image although I wanted to change some info in the header itself like some of the meta.
I bookmarked the link. It might come in handy in the future. Thanks!
Just for info:
get_header('myheader'); // will include header-myheader.php
get_footer('myfooter'); // will include footer-myfooter.php
get_sidebar('mysidebar'); // will include sidebar-mysidebar.php