Adding “latest from the blog” to the homepage

Personally, I like using get_posts() (Codex ref) for quick-and-dirty Loops.

In your front-page.php template file, try the following:

<?php

// Create a variable to hold our custom Loop results
$frontpageposts = get_posts( array( 
     'numberposts' => 2 // only the 2 latest posts
) );

// Create output only if we have results
// Customize to suit your HTML markup
if ( $frontpageposts ) { 

     foreach ( $frontpageposts as $fppost ) { 
          // setup postdata, so we can use template tags
          setup_postdata($fppost);
          ?>

          <div <?php post_class(); ?>>
               <h2><a href="https://wordpress.stackexchange.com/questions/16413/<php the_permalink(); ?>"><?php the_title(); ?></a></h2>
               <div class="post-entry">
                    <?php the_post_thumbnail(); ?>
                    <?php the_excerpt(); ?>
               </div>
          </div>

<?php }
} 
?>

Again, you’ll need to modify the HTML markup according to your needs.

tech