<?php get_header(); ?>

	<?php 
		if (have_posts()) : 
			while (have_posts()) : the_post(); 
		?>
		<div <?php post_class(); ?>>
			<h1><?php get_custom_field('heading') ? get_custom_field('heading',true) : the_title(); ?></h1>
			<div class="entry">
				<?php
					the_content(); 
					wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number'));
					edit_post_link('Edit this page.', '<p>', '</p>'); 
				?>
			</div>
		</div>
		
	<?php 
			display_comments();
			endwhile; 
		else: 
			include (TEMPLATEPATH . '/404.php'); 
		endif; 
	?>

<?php get_sidebar(); ?>
<?php get_footer(); ?>