Ignore the formatting and what not, the theme is a work in progress. This is just the contents of the index.php file. You’ll notice there’s an if-else before the main body of content and an if-else afterward just containing echo’s. The first one outputs HOMEPAGE and the second one doesn’t. Any thoughts, greatly appreciated.
<?php
get_header();
if (is_front_page() || is_home()) echo 'HOMEPAGE';
else echo 'HMM NOT HOMEPAGE';
// IF [homepage]
if (is_front_page() || is_home()) {
$controlPanel = get_option('controlPanel'); ?>
<script type="text/javascript">
//swfobject.embedSWF('<?php bloginfo('template_directory'); ?>/assets/flash/introduction.swf', 'flash', '495', '240', '9.0.0', {}, {title: '<?php echo $controlPanel['homepageFlashText']; ?>'}, {});
</script>
<img id="flash" class="screen" src="<?php bloginfo('template_directory'); ?>/assets/images/noFlash.png" alt="<?php echo stripslashes($controlPanel['homepageFlashText']); ?>" width="495px" height="240px" />
<p id="introduction"><?php echo stripslashes($controlPanel['homepageIntroduction']); ?></p>
<h3>Latest News</h3>
<?php query_posts('showposts=1&category_name=news');
global $more;
$more = 0;
if (have_posts()) :
while (have_posts()) : the_post(); ?>
<div class="post split">
<div class="image">
<div class="container">
<img src="<?php echo get_bloginfo('url').'/'.get_option('upload_path').'/'.get_post_meta($post->ID, 'thumbnail', true); ?>" alt="<?php the_title(); ?>" />
</div>
</div>
<div class="text">
<h3><?php the_title(); ?></h3>
<?php the_content('Read More'); ?>
<p class="date"><?php the_time('F j, Y'); ?> at <?php the_time('G:i'); ?></p>
</div>
</div>
<?php endwhile;
else: ?>
<div class="post">
<p>There are currently no news items to display.</p>
</div>
<?php endif; ?>
<h3>Case Studies</h3>
<?php query_posts('showposts=1&category_name=casestudies');
global $more;
$more = 0;
if (have_posts()) :
while (have_posts()) : the_post(); ?>
<div class="post split">
<div class="image">
thumbnail here
</div>
<div class="text">
<h3><?php the_title(); ?></h3>
<?php the_content('Read More'); ?>
<p class="date"><?php the_time('F j, Y'); ?> at <?php the_time('G:i'); ?></p>
</div>
</div>
<?php endwhile;
else: ?>
<div class="post">
<p>There are currently no case studies to display.</p>
</div>
<?php endif;
// IF [static page]
} else if (is_page()) {
if (have_posts()) :
while (have_posts()) : the_post(); ?>
<div id="banner">
<h2><?php the_title(); ?></h2>
<?php $site->breadcrumbs($post, null); ?>
</div>
<?php $site->subpages($post);
the_content();
endwhile;
endif;
// IF [single post]
} else if (is_single()) {
if (have_posts()) :
while (have_posts()) : the_post(); ?>
<div id="banner">
<h2><?php the_title(); ?></h2>
<?php $site->breadcrumbs($post, get_the_category()); ?>
</div>
<?php the_content(); ?>
<p class="date"><?php the_time('F j, Y'); ?> at <?php the_time('G:i'); ?></p>
<?php endwhile;
endif;
}
if (is_front_page() || is_home()) echo 'HOMEPAGE';
else echo 'HMM NOT HOMEPAGE';
get_footer();
?>