[wp-hackers] custom header on page template

Chip Bennett chip at chipbennett.net
Wed Mar 9 20:22:00 UTC 2011


Oh, good call. I should have consulted the source code before I spoke!

Chip

On Wed, Mar 9, 2011 at 2:17 PM, Will Anderson <will at itsananderson.com>wrote:

> Actually, I'm not sure that's true. See
>
> http://core.trac.wordpress.org/browser/trunk/wp-includes/general-template.php#L9
>
> <
> http://core.trac.wordpress.org/browser/trunk/wp-includes/general-template.php#L9
> >Additionally,
> get_template_part() != get_header() because get_header calls the
> 'get_header' action, which I'm pretty sure many plugins utilize.
>
> <
> http://core.trac.wordpress.org/browser/trunk/wp-includes/general-template.php#L9
> >Martin:
> you may want to check that header-photo.php is in the root of your theme,
> and double check that you didn't name it header_photo.php or something.
>
> On Wed, Mar 9, 2011 at 3:10 PM, Chip Bennett <chip at chipbennett.net> wrote:
>
> > get_header() only loads header.php
> >
> > Try using get_template_part():
> >
> > get_template_part( 'header', 'photo' );
> >
> >
> > Chip
> >
> > On Wed, Mar 9, 2011 at 2:05 PM, Martin Trtílek <trta911 at gmail.com>
> wrote:
> >
> > > Hi all :-)
> > > i have one page template called ...for example photo and additional
> > header
> > > called header-photo.php.
> > > If i try write get_header('photo'); on photo page template so page
> still
> > > loads my default header (header.php) but i want to load the photo
> header.
> > > Is there way, how to accomplish this? I'm search on web but wit no
> > success
> > > solution.
> > > Thanks.
> > > _______________________________________________
> > > wp-hackers mailing list
> > > wp-hackers at lists.automattic.com
> > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > >
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list