Maps

1, ‘category’ => 15, ‘orderby’ => ‘rand’);
$totd9 = get_posts($args);
$midnight = strtotime(‘sunday +1 day’);
$timenow = time();
$timetillmidnight = $midnight – $timenow;
//echo $midnight;
//echo “,”.$timenow;
set_transient(‘totd9_trans_post_id’, $totd9[0]->ID, $timetillmidnight);
} else {
$args = array(‘post__in’ => array($totd9_trans_post_id));
$totd9 = get_posts($args);

}

foreach( $totd9 as $post ) : setup_postdata($post); ?>