[wp-hackers] custom header on page template
Jesus Lizama
beautifulcrimes at gmail.com
Wed Mar 9 21:08:17 UTC 2011
you can add an <?php if (is_page()){ //stuff goes here } ?> function on
your header.php to output what you want it to.
On Wed, Mar 9, 2011 at 12:22 PM, Chip Bennett <chip at chipbennett.net> wrote:
> 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
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
--
Jesus Lizama
Developer/Designer
Spifffy.com | ConquerLA.com | Bassdump.com
Cell: (323)336-2953
More information about the wp-hackers
mailing list