Try with this:
<?php if (is_front_page()) {
include ('front-page.php');
} else {
include ('not-front.php');
} ?>
it still doesn’t seem to be working. Here is the exact code I am using, perhaps I’m using the TEMPLATE_PATH tag wrong.. Thanks for your help.
<?php
if (is_front_page()) {
include ('TEMPLATE_PATH. ../westbury/front-contentheader.php');
}
else {
include ('TEMPLATE_PATH. contentheader.php');
}
?>
The TEMPLATE_PATH is wrong, must be:
<?php if (is_front_page()) {
include (TEMPLATEPATH . '/westbury/front-contentheader.php');
} else {
include (TEMPLATEPATH . '/contentheader.php');
} ?>
Ok so I got the header working using the bloginfo(‘template_url’) tag instead of the TEMPLATEPATH tag. Now I am trying to do the same in the footer but it doesn’t seem to be working. Not only do I loose my footer when I impliment this code but the WP admin bar disapears
<?php
if (is_front_page()) {
include (bloginfo("template_url") . 'front-contentfooter.php');
}
else {
include (bloginfo("template_url") . 'contentfooter.php');
}
?>
<?php
<!--basic2col_contentfooter();-->
wp_footer();
?>
<?php /*Basic2Col WordPress theme by Kristin K. Wangen http://wangenweb.com/ */ ?>
</body>
</html>
any help is appreciated
You have not said what is in the two files, but if it is just a different footer content then look at template parts.
Rename the files and move them both to the theme or child themes folder, footer-content.php and footer-front.php
Then the code is as easy as:
<?php if ( is_home() || is_front_page() ) : ?>
<?php get_template_part('footer','front'); ?>
<?php else : ?>
<?php get_template_part('footer','content'); ?>
<?php endif; ?>
Even easier, just take the code above and save this in a third file called footer-custom.php
Then just call this in each file where required with a single line:
<?php get_template_part('footer','custom'); ?>
BTW you are missing the folder switch / :
include ( bloginfo("template_url") .'/front-contentfooter.php' );
HTH
David