SHARE
TWEET

Untitled

a guest Dec 13th, 2011 55 Never
  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.  
RAW Paste Data
Top