Posted By

pruntrut on 07/05/12


Tagged


Versions (?)

If Have Posts, While Have Posts, The Post


 / Published in: Other
 

  1. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
  2.  
  3. <div class="content">
  4. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
  5. <h1><?php the_title(); ?></h1>
  6. <?php the_content(); ?>
  7. <?php endwhile; else: ?>
  8. <p>Sorry, no posts found.
  9.  
  10. <?php endif; ?>
  11. </div>
  12.  
  13.  

Report this snippet  

You need to login to post a comment.