Step 5: Constructing the Homepage.
Now that we have constructed the header and sidebar we can move onto the most important element, index.php. Open the template you are using to embed Wordpress into and copy the code from the end of the sidebar all the way down to the beginning of the footer. Then paste this into index.php ensuring you do not include elements of the sidebar or footer – you should have began copying right after the code that makes up the sidebar and stopped right before the coding for your footer.
Now we need to add the header, sidebar and footer into the index file. This is really simple and required just 3 lines of coding. Insert the first piece of code into the first line of index.php, the remaining 2 should be placed on the last line of index.php
First line of index.php:
<?php get_header(); ?>
Last line:
<?php get_sidebar(); ?>
<?php get_footer(); ?>

