Following this tutorial: http://blog.teamtreehouse.com/responsive-wordpress-bootstrap-theme-tutorial
The tutorial instructs me to create an index.php with the contents:
<?php get_header(); ?>
<!-- loop-->
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<?php get_footer(); ?>
This creates a template with my header on top and footer at the bottom. Then, the tutorial instructs me to create a front-page.php with the contents:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
Basically, the same thing as index.php minus a few lines of code, most importantly the <?php get_header(); ?>
and <?php get_footer(); ?>
commands. The problem is that, when I create this page, my front page no longer has either its header or its footer, or the formatting that lives within the header and footer.
Yet, on the tutorial, the header, footer, and formatting still apply on the front page. What am I doing wrong?