Different header for each page
-
Hello all,
I’m fairly new to wordpress and my PHP knowledge isn’t very good, I’ve searched google many times, the forums here too, but to not find a solution to my problem.
I recently came across a code which I thought would work, seemed logical to me and everything, with what knowledge I have and considering doing an attempt myself I did something similar.
Got me this:
Parse error: syntax error, unexpected ‘<‘ in /nfs/c06/h02/mnt/89623/domains/blog.iamsteve.me/html/wp-content/themes/iamsteve/header.php on line 43Using this:
<?php if (is_page('about')) {<?php include(TEMPLATEPATH . '/about_header.php'); ?>} elseif(is_page('portfolio')) {<?php include(TEMPLATEPATH . '/portfolio_header.php'); ?>} elseif(is_page('blog')) {<?php include(TEMPLATEPATH . '/blog_header.php'); ?>} elseif(is_page('contact')) {<?php include(TEMPLATEPATH . '/contact_header.php'); ?>} else {<?php include (TEMPLATEPATH . '/home_header.php'); ?>} ?>
I want a unique header for each page, I have created each of the pages home_header.php, contact_header.php etc.
Also I don’t want to have to use a plugin, the way my header is designed is not one image it’s sliced up into several, so the best way to me seemed to use a code like the above.
Thanks in advance for your help.
- The topic ‘Different header for each page’ is closed to new replies.