The first thing to do is to create header files. Create as many different headers as you want.
In this exemple, I have created 2 custom headers from my theme default file header.php, names headercontact.php  and headerdefault.php.
By using the php include() function and WordPress conditional tags, we can define custom headers easily.
Replace the content of your header.php file with the following code:

 

<?php

if (is_page(‘contact’)){

?>

<?php

include(TEMPLATEPATH.’/headercontact.php’);

?>

<?php

} else

{?>

<?php include(TEMPLATEPATH.’/headerdefault.php’); ?>

<?php

}

?>

If you found this article useful then please share it !
Trackback

no comment untill now

Add your comment now