Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   Can't get alternate headers working in Montezuma (http://forum.bytesforall.com/showthread.php?t=21606)

wintersb Mar 4, 2014 07:37 PM

Can't get alternate headers working in Montezuma
 
My intent is to call a new header with certain pages.

I created a new page template called page-2.php and used it to create a few pages. This page template calls the sub-template header-2.php as in this line, according to instructions listed in many places.

<?php get_header('2'); ?>

It doesn't work. Instead it calls the default template. The header-2 template is so far (for testing purposes) a clone of the default header with only a same sized image changed.

I've tried tampering with the above line, and turning it into an include type command, but it only then returns me no header on my test pages. So at least I know the page-2.php works in calling the sub-template. But that's it.

Does montezuma support alternate headers?

juggledad Mar 8, 2014 04:20 AM

if your subtemplate is 'header-2.php' then try using
HTML Code:

<?php get_header(header-2); ?>

CrouchingBruin Apr 13, 2014 05:39 PM

It appears that with the latest release, get-header() still does not work with alternate headers. In the example above, with the sub template name of header-2.php, get-header('2'), get-header('header-2'), nor get-header(header-2) work, the original header.php still gets called.

However, one of the new functions for Release 1.2.2, bfa_get_template_part('header-2', ''), does work, so that can be used if an alternate header is needed.


All times are GMT -6. The time now is 05:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.