SHARE
TWEET

Untitled

a guest Sep 22nd, 2011 73 Never
  1. <?php if (have_posts()) : ?>
  2.  
  3.   <?php if (($wp_query->post_count) > 1) : ?>
  4.      <?php while (have_posts()) : the_post(); ?>
  5.        <!-- Do your post header stuff here for excerpts-->
  6.           <?php the_excerpt() ?>
  7.        <!-- Do your post footer stuff here for excerpts-->
  8.      <?php endwhile; ?>
  9.  
  10.   <?php else : ?>
  11.  
  12.      <?php while (have_posts()) : the_post(); ?>
  13.        <!-- Do your post header stuff here for single post-->
  14.           <?php the_content() ?>
  15.        <!-- Do your post footer stuff here for single post-->
  16.      <?php endwhile; ?>
  17.  
  18.   <?php endif; ?>
  19.  
  20. <?php else : ?>
  21.      <!-- Stuff to do if there are no posts-->
  22.  
  23. <?php endif; ?>
RAW Paste Data
Top