| get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_date ASC"); foreach ( $years as $year ) { if ($year != (0) ) { ?> |
99999, 'year' => (int)$archive_year, 'post_type' => array('post') ); Protect(); $posts = &query_posts($args); while (have_posts()) : the_post() ?>