posts} WHERE post_type = 'post' AND post_status = 'publish' ORDER BY post_date DESC"; $AllPosts = $wpdb->get_results($SQL); // all months $MonthAbr = array(); $MonthNames = array(); for ($i = 1; $i <= 12; $i++) { $MonthAbr[$i] = ucfirst(strftime(__("%b",'constructor'), strtotime($i."/01/2001"))); $MonthNames[$i] = ucfirst(strftime(__("%B",'constructor'), strtotime($i."/01/2001"))); } // posts to our format $Archive = array(); foreach ($AllPosts as $Post) { if (!isset($Archive[$Post->year][$Post->month])) $Archive[$Post->year][$Post->month] = array(); $Archive[$Post->year][$Post->month][] = array('ID'=>$Post->ID, 'title'=>$Post->post_title); } get_header(); ?>
id="post-">

$Month) : ?>
$Month) : ?>

= 1; $i--) : ?>