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

Untitled

By: a guest on Dec 13th, 2011  |  syntax: None  |  size: 0.72 KB  |  views: 50  |  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 ($related_query->have_posts()):
  2.         $postsArray = array();
  3.         $cnt=0;
  4.         while ($related_query->have_posts() && $cnt<3) : $related_query->the_post();
  5.                 $release = get_post_meta($post->ID, 'final', true);
  6.                 $release += 86400;
  7.                 $todaysDate = time();
  8.                 if ( $todaysDate < $release):
  9. $rastas = ( get_post_meta($post->ID, 'vardas', true) ) ? ( get_post_meta($post->ID, 'vardas', true) ) : get_the_title();
  10. $postsArray[] = '<li><a href="'.get_permalink().'" rel="related" title="'.get_the_title().'">'.$rastas.'</a></li>';
  11. $cnt++;
  12.                 endif;
  13.         endwhile;
  14. if(!empty($postsArray)):
  15.         echo '<li class="widget-container"><h3 class="widget-title">Top Upcoming Games</h3><ul>', implode("\n",$postsArray), '</ul></li>';
  16. endif;
  17. endif; ?>
  18.  
clone this paste RAW Paste Data