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

Untitled

By: a guest on Jan 28th, 2013  |  syntax: None  |  size: 0.41 KB  |  views: 34  |  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 $do_not_duplicate[] = 0; ?>
  2.         <?php if ( have_posts() ) : while ( have_posts() ) : the_post();
  3.                 $category = get_the_category();
  4.                 if (!in_array($category[0]->cat_ID, $do_not_duplicate)) :
  5.                         $do_not_duplicate[] = $category[0]->cat_ID;
  6.         ?>
  7.                         <!--[HTML for show the posts]-->
  8.                        
  9.         <?php endif; ?>
  10.        
  11.         <?php endwhile; else: ?>
  12.         <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
  13.         <?php endif; ?>
clone this paste RAW Paste Data