Headers with different banners for different pages; a code question.
-
I’ve been able to successfully use an alternate banner for specific pages on my site, using the following code:
if (is_page('5436')){ include(TEMPLATEPATH.'/header-alternate.php'); } else { include(TEMPLATEPATH.'/headerdefault.php');etc.
However, when I try to use an elseif statement so that I can use a third banner for specific pages, it messes up the header (and hence the whole site). The code I’m trying to use is (example):
if (is_page('5436')){ include(TEMPLATEPATH.'/header-alternate.php'); } elseif (is_page('5450','5508')){ include(TEMPLATEPATH.'/header-alternate2.php'); } else { include(TEMPLATEPATH.'/headerdefault.php');Am I doing something wrong? All the necessary files are located in the right place. Why does it work OK with the first example, but not the second?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Headers with different banners for different pages; a code question.’ is closed to new replies.