Our next step is to create the Main page, which is the index.php
file. We have already added the call to get the Header and the Footer, but inside the index.php
file we also need to add the code to display the list of posts of the blog. So our index.php
file will look like this:
<?php get_header(); ?> <div id="main"> <div id="content"> <div id="contentCont" style="display:none;"> <!-- #1 --> <?php while ( have_posts() ) : the_post(); ?> <div id='post' class="post"> <!-- #2 --> <div id="title" style="display:none;"><?php the_title(); ?></div> <!-- #3 --> <div class="post-details"> <!-- #4 --> <div class="post-details-left"> Posted on <strong><?php the_date(); ?></strong> by <span class="author"><?php the_author(); ?></span> under <span class="author"><?php the_category(', '); ?></span> ...