I have the below code in front-page.php
(with that page set in Settings > Reading); however, something is wrong because the posts aren’t showing. The output is shown below. Can someone identify what the problem may be?
<?php get_header();?>
<section id="home-content">
<section id="latest-news">
<h2>Latest News</h2>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article class="entry" id="post-<?php the_ID(); ?>">
<?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?>
<section class="description">
<h3><?php the_title(); ?></h3>
<time datetime="<?php the_time('c'); ?>"><?php the_time('F d, Y'); ?></time>
<?php the_content(); ?>
<p class="post-categories">Categorized under: <?php the_category(', '); ?></p>
<a class="read-more" href="<?php the_permalink() ?>" rel="bookmark" title="Read <?php the_title_attribute(); ?>"></a>
</section>
</article>
<?php endwhile; ?>
<?php my_paginate_links(); ?>
<?php endif; ?>
</section>
</section>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
The code above outputs the html below. Note: “Home” is a page, not a post.
<article class="entry" id="post-1048">
<section class="description">
<h3>Home</h3>
<time datetime="2012-08-29T06:38:44+00:00">August 29, 2012</time>
<p class="post-categories">Categorized under: </p>
<a class="read-more" href="http://site.com/" rel="bookmark" title="Read Home"></a>
</section>
</article>
Turn your Settings->Reading Blog and Home page back to default. Front-page.php is pulling your homepage content instead of your posts because you’ve told it to in your settings.
http://wordpress.org/support/topic/difference-between-homephp-and-front-pagephp