-1, order => 'ASC', )); $archive = array(); foreach ($posts as $post) { $date = strtotime($post->post_date); $year = date('Y', $date); $month = date('F', $date); $day = date('jS', $date); $url = get_permalink($post->ID); $comments = $post->comment_count === '1' ? '1 comment' : $post->comment_count . ' comments'; if ($post->post_status === 'publish') { $archive[$year][$month][] = array( title => $post->post_title, slug => $post->post_name, author => $post->post_author, day => $day, url => $url, comments => $comments, ); } } ?>
    $yearData) : ?>
    1. $monthData) : ?>
      1. ()