Support » Fixing WordPress » Archives by Year : Month

  • I have spent a lot of time trying to figure out how to and looking on the NET for examples how to:

    Display my archives as such:

    2006: Jan Feb March April (etc….)
    2005: Jan Feb March April (etc…)

    I have a PAGE for my archives and so far have it displaying the years with the following:

    $years = $wpdb->get_col(“SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = ‘publish’ ORDER BY post_date DESC”);
    foreach($years as $year) : ?>

  • “><?php echo $year; ?>
  • <?php endforeach; ?>

    Does anyone have an example of how I can cycle through each valid archive year and display a link by month within each year?

    Thanks in advance!!

Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Archives by Year : Month’ is closed to new replies.