Theme with Multiple Custom Headers?
-
I am new to WordPress and am playing around with the themes. Is anyone aware of a theme out there that meets the following qualifications:
1. Has customizable header
2. Has page navigation with a separate header for each page
3. Custom header on each page can change each time you view the siteIs this asking too much?
Steven
-
I would like to edit the code so that each page calls up a different header. Just adding this to this topic as well…thanks.
Kathi
Boy I sure could use help on this! Does anyone have an answer!
Thanks
kathii want to do this as well does anybody know how to do it ?
I’m not a greater coder but to call different headers i use this code in my index.php and page templates.
<?php if (is_page('contact') { <?php include (TEMPLATEPATH . '/headercontact.php'); ?> } elseif (is_page('gallery') { <?php include (TEMPLATEPATH . '/headergallery.php'); ?> } else { <?php get_header(); ?> } ?>then just make the files headercontact.php and headergallery.php
otherwise i think these pages might help you out…
http://codex.wordpress.org/Conditional_TagsHi Saucehaus,
Can you give show what the content of (e.g) headercontact.php can be?Hi Saucehaus,
What I would do is to make a copy of header.php named headercontact.php. Then change whatever you need to change on headercontact.php. That way all the code is there except for what you want different like maybe a different header pic or something.
MC
There are a theme called Mandigo which allow different headers per page. Anyway I want to know how to make a different style css per page
Thanks
hi.. I am excited in having seen this issue being talked here.. ^^
Thanks saucehaus for good advice.
I have got another question here..
Here is what I am trying to do:
- a. I need a different entrant page, say, index.php of my site.
(I am trying to set up a differnt header page, say, topheader.php) - b. I will have some more pages, no need of blog pages.
(I try to name them as aboutheader.php, contatusheader.php, and etc.,) - c. I will need a standard blog page, using header.php.
and,
if I hope to make things simple, could I add a topheader.php and just use the code: include (TEMPLATEPATH . ‘/topheader.php’); ?>
I found that it shows topheader.php has not been defined.. could anyone tell me how to define a new *.php file?
or.. Am I in a wrong direction?
me again.. ><
could anyone advise me any direction ? S.O.S.
I will try hard byself.. …
I’ve encountered a PHP error which was a result of repeating the “<?php ” in the IF terms, how ever I tries the code below and it worked perfectly!
<?php
if (is_page(‘contact’)){
include(TEMPLATEPATH.’/headercontact.php’);}
elseif (is_page(‘gallery’)){
include(TEMPLATEPATH.’/headergallery.php’);}
else {
include(TEMPLATEPATH.’/headerdefault.php’);}
?>Makes sense really…
Using…
<?php if (is_page('contact') { <?php include (TEMPLATEPATH . '/headercontact.php'); ?> } elseif (is_page('gallery') { <?php include (TEMPLATEPATH . '/headergallery.php'); ?> } else { <?php get_header(); ?> } ?>You’re basically saying switch into PHP when you’re already in PHP..
Which quite simply won’t work…
- a. I need a different entrant page, say, index.php of my site.
The topic ‘Theme with Multiple Custom Headers?’ is closed to new replies.