posts; //get post date of next future post $dateOfFuturePost = $wpdb->get_var("SELECT post_date from $tableposts WHERE post_date > NOW() AND post_status = 'publish' ORDER BY post_date ASC LIMIT 1"); if ($dateOfFuturePost) { $dateAsStringOfFuturePost = mysql2date(get_settings('date_format'),$dateOfFuturePost)." ".mysql2date(get_settings('time_format'), $dateOfFuturePost); if ($printIt) {print $dateAsStringOfFuturePost;}; return $dateAsStringOfFuturePost; }; return ''; }; function numberOfFuturePosts($printIt=1) { global $wpdb, $tableposts, $tablepost2cat, $tablecategories, $post; if (!isset($tableposts)) $tableposts = $wpdb->posts; //get post dates of next future posts $datesOfFuturePosts = $wpdb->get_results("SELECT post_date from $tableposts WHERE post_date > NOW() AND post_status = 'publish' ORDER BY post_date ASC"); if ($datesOfFuturePosts) { $numFuturePosts = count($datesOfFuturePosts); if ($printIt) {print $numFuturePosts;}; return $numFuturePosts; }; return ''; }; ?>