[resolved] Calling Different Headers (5 posts)

I am doing something wrong, but I don't know what. I am trying to write a theme that calls one header on the index.php and a different one for single.php. The headers are named respectively header1.php and header2.php.

I have tried substituting the call function with the appropriate file name but when I load the blog I get a fatal error. On index.php I start out with
line 1<blockquote><?php get_header1(); ?></blockquote>

When i load the blog in a browser I get:

Fatal error: Call to undefined function get_() in C:\xampplite\htdocs\wtf\wp-content\themes\WTF\index.php on line 1

While using a php include will work the best way to call different headers in WordPress is like this: get_header('HeaderName'). At that point all you have to do is have a header file named header-HeaderName.php in your theme directory.

Works like a charm and won't break WordPress if you upgrade/make changes.