<?php if(have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>      

<!-- Your Post Query here -->

<?php endwhile; ?>  
  <?php endif; ?>
Example
<div class="content">
       <?php if(have_posts()) : ?>
            <?php while (have_posts()) : the_post(); ?>      

<!-- Your Post Query start -->  
<div class="post" id="post-<?php the_ID(); ?>">
<div id="post-title" class="fix">
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
</div> <!-- end div .post-title -->
<div class="breadcumbs fix">
<?php if (function_exists('wordpress_breadcrumbs')) wordpress_breadcrumbs(); ?>
</div>
<div class="entry fix">
<?php the_post_thumbnail('post-image', array('class' => 'single-post')); ?>
<?php the_content(); ?> 
<div class="space fix">
<?php get_template_part( 'postmeta' ); // Post Meta (postmeta.php) ?>
</div>

<?php comments_template( '', true ); ?>  
</div> <!-- end div .entry -->
</div> <!-- end div .post -->
<!-- Your Post Query end -->

<?php endwhile; ?>    
<?php endif; ?> 
 </div>
Back To Top