[wp-hackers] custom header on page template

Martin Trtílek trta911 at gmail.com
Thu Mar 10 21:38:18 UTC 2011


Thanks for all !! I'm got a custom header into page template...but knows
anybody why don't work simple get_header('something') ? ...of interest :-)


2011/3/9 Jesus Lizama <beautifulcrimes at gmail.com>

> If you have a custom page template all you have to do is add parameters to
> is_page().
>
> On Wed, Mar 9, 2011 at 1:08 PM, Jesus Lizama <beautifulcrimes at gmail.com
> >wrote:
>
> > 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
> >
> >
>
>
> --
> Jesus Lizama
> Developer/Designer
> Spifffy.com | ConquerLA.com | Bassdump.com
> Cell: (323)336-2953
> _______________________________________________
> 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