Advertisement
Guest User

TheMarque's code for Category Templates

a guest
Apr 17th, 2012
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.29 KB | None | 0 0
  1.  <?php
  2. query_posts('showposts=1');?>
  3. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  4.  
  5.     <?php the_post_thumbnail();?>
  6. <?php the_excerpt(); ?>
  7.  
  8.   <?php endwhile; endif; wp_reset_query();?>
  9.  
  10.  
  11. <?php $my_query = new WP_Query('posts_per_page=1');
  12.   while ($my_query->have_posts()) : $my_query->the_post();
  13.   $do_not_duplicate = $post->ID;?>
  14. <?php if (have_posts()) : ?>
  15. <?php while (have_posts()) : the_post(); ?>
  16.  
  17.  <div class="post">
  18.             <a href="<?php the_permalink(); ?>" rel="nofollow"><?php beaux_post_attachment_image('0','100','100','thumbnail alignleft'); ?></a>
  19.             <div class="content">
  20.               <h2 class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
  21.               <?php the_excerpt(); ?>
  22.             </div><!-- end of content -->
  23.             <div class="meta">
  24.               <ul><li><?php the_time('m.d.y') ?></li>|<li><?php the_author(); ?></li></ul>
  25.               <?php if($show_comments == 'true'): ?><div class="postcomments"><?php comments_popup_link('No Comment', '1 Comment', '% Comments'); ?></div><?php endif; ?>
  26.             </div><!-- end of meta -->
  27.           </div>
  28.  
  29.  
  30. <?php endwhile; ?>
  31. <?php endif; wp_reset_query();?>
  32.           <?php endwhile; if(function_exists('wp_pagenavi')) wp_pagenavi(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement