Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 16th, 2012  |  syntax: None  |  size: 0.85 KB  |  views: 64  |  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 $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("posts_per_page=5&paged=$paged"); ?>
  4.    
  5.         <?php while (have_posts()) : the_post(); ?>
  6.                         <?php if (is_paged()) : ?>
  7.                                 <?php $postclass = ('other entries'); ?>
  8.                         <?php else : ?>
  9.                                 <?php $postclass = ($post == $posts[0]) ? 'first entry' : 'other entries'; ?>
  10.                         <?php endif; ?>
  11.  
  12.         <div class="<?php echo $postclass; ?>">
  13.  
  14.                 <h1><a href="<?php the_permalink() ?>" rel="bookmark" title=""><?php the_title(); ?></a></h1>
  15.                 <?php the_content(''); ?>
  16.  
  17.         </div>
  18.  
  19.     <?php endwhile; ?>
  20.                 <div class="navigation">
  21.                         <div class="alignleft"><?php next_posts_link(__('Older Entries', 'minimalism')) ?></div>
  22.                         <div class="alignright"><?php previous_posts_link(__('Newer Entries', 'minimalism')) ?></div>
  23.                 </div>
  24.         <?php endif; ?>
clone this paste RAW Paste Data