This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 22nd, 2011  |  syntax: PHP  |  size: 0.66 KB  |  views: 71  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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; ?>
clone this paste RAW Paste Data