View Single Post
Old 02-28-2012, 12:34 PM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
Quote:
Originally Posted by harvey View Post
I'm not 100% sure what do you mean, anyway, if you're using 2 headers (is that what you mean?) then you need to require the correct header, like this:

Code:
<?php include(TEMPLATEPATH.'/header2.php'); ?>
however, to avoid mistakes, juts use conditionals. Replace EVERYTHING you have in header.php with something like this:

Code:
<?php
if (is_front_page()){
	<?php include(TEMPLATEPATH.'/mainheader.php'); ?>
}
elseif (is_single()){
	<?php include(TEMPLATEPATH.'/header-single.php'); ?>
}
else {
	<?php include(TEMPLATEPATH.'/header1.php'); ?>
}
?>
this code will allow you to use 1 header for your main static page, a different one for single pages (if you need it) and everything else (such as pages) will use a default header. Play with it as you wish
i would just use get_header() for multiple headers.

single.php instead of get_header() use get_header('single');

header-single.php it will look for.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote