Hi
Try something like this syntax
<?php
if (is_page('a_page_name')) {
include (TEMPLATEPATH . '/header_1.php');
} elseif (is_page('another_pagename')) {
include (TEMPLATEPATH . '/header2.php');
} else {
get_header();
}
?>
Thank you for your answer stvwlf. I may use your code suggestion if I cannot found out to make “get_header(‘name’) to work.
I am continuing to look for the ability to use: get_header(‘name’) to change the header on several different pages with different header information. This techniques is described in the 2.7 notes in the codex and the code that should make it work seems to be in the general template within wordpress 2.7.1.
Doe someone know how to get it to work? It seems odd that this would be documented in two places in the wordpress documentation but doe not work?
Has this code been implemented better in the to be released 2.8 ?
any additional help out there?
I am having the same trouble, using the exact code but keep getting this eror: “Parse error: syntax error, unexpected ‘<‘ in /home/content/d/e/a/dear429thyroid/html/wp-content/themes/republica/header.php on line 8”
Line 8 being the first <?php for get_header
<?php
if (is_page('6')){
<?php get_header('header-headerabout'); ?>
}
elseif (is_page('1813')){
<?php get_header('header-headercontactus'); ?>
}
else {
<?php get_header('header-headerdefault'); ?>
}
?>
The install is the very latest version of WP and I just don’t see why it’s not working. Any help would be appreciated