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

Untitled

By: a guest on Dec 6th, 2012  |  syntax: PHP  |  size: 0.96 KB  |  views: 42  |  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
  2. $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  3.  
  4. query_posts('posts_per_page=2&paged=' . $paged);
  5. ?>
  6.  
  7. <?php while (have_posts()) : the_post(); ?>
  8.  
  9. <div id="postbox">
  10.  
  11.         <span class="title"><a href="<?php the_permalink() ?>" ><?php the_title(); ?></a></span><br>
  12.  
  13.         <span class="infotop"><span class="space"><?php the_author(); ?></span> <span class="space"><?php the_time('j M Y') ?></span> <span class="space"><?php the_category(', '); ?></span></span>
  14.  
  15.         <div class="    <?php
  16.     if ( in_category( 'category1' )) {
  17.         echo "category1class";
  18.     if ( in_category( 'category2' )) {
  19.         echo "category2class";
  20.     } else {
  21.         echo "generalcategoryclass";
  22.     }
  23.     ?>
  24. ">
  25.         <?php the_content('Read More...'); ?>
  26.         </div>
  27.  
  28.         <span class="postinfo">
  29.          <?php the_tags('', ', ', ''); ?> <span class="space"><?php comments_popup_link('No Comments', 'One Comment', '% Comments');?></span>
  30.         </span>
  31.  
  32. </div>
  33.  
  34.  
  35.  
  36.  
  37. <?php endwhile; ?>
clone this paste RAW Paste Data