2009-11-13 16:00:25 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
Template Name: Comic Archive
|
|
|
|
*/
|
|
|
|
?>
|
|
|
|
<?php get_header(); ?>
|
|
|
|
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
2009-12-20 12:05:59 +00:00
|
|
|
|
2009-12-23 18:43:05 +00:00
|
|
|
<?php
|
|
|
|
if (have_posts()) {
|
|
|
|
while (have_posts()) : the_post();
|
2009-12-24 23:01:47 +00:00
|
|
|
comicpress_display_post();
|
2009-12-23 18:43:05 +00:00
|
|
|
endwhile;
|
|
|
|
}
|
|
|
|
?>
|
2009-11-13 16:00:25 +00:00
|
|
|
|
2009-12-20 12:05:59 +00:00
|
|
|
<?php
|
|
|
|
$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 ) {
|
|
|
|
if ($year != (0) ) {
|
|
|
|
?>
|
2009-12-24 23:15:30 +00:00
|
|
|
<div <?php post_class(); ?>>
|
|
|
|
<div class="post-head"></div>
|
2009-12-24 23:22:28 +00:00
|
|
|
<div class="post-content">
|
2009-11-13 16:00:25 +00:00
|
|
|
<h3><?php echo $year ?></h3>
|
|
|
|
<table class="month-table">
|
2009-12-20 12:05:59 +00:00
|
|
|
<?php $comicArchive = new WP_Query(); $comicArchive->query('showposts=10000&cat='.get_all_comic_categories_as_cat_string().'&year='.$year);
|
2009-11-13 16:00:25 +00:00
|
|
|
while ($comicArchive->have_posts()) : $comicArchive->the_post() ?>
|
|
|
|
<tr><td class="archive-date"><?php the_time('M j') ?></td><td class="archive-title"><a href="<?php echo get_permalink($post->ID) ?>" rel="bookmark" title="<?php _e('Permanent Link:','comicpress'); ?> <?php the_title() ?>"><?php the_title() ?></a></td></tr>
|
|
|
|
<?php endwhile; ?>
|
|
|
|
</table>
|
2009-11-29 12:40:02 +00:00
|
|
|
<br class="clear-margins" />
|
2009-11-13 16:00:25 +00:00
|
|
|
</div>
|
2009-12-24 23:15:30 +00:00
|
|
|
<div class="post-foot"></div>
|
2009-11-17 06:34:46 +00:00
|
|
|
</div>
|
2009-12-20 12:05:59 +00:00
|
|
|
<?php }
|
|
|
|
} ?>
|
2009-11-13 16:00:25 +00:00
|
|
|
|
2009-12-20 12:05:59 +00:00
|
|
|
<?php if ('open' == $post->comment_status) { comments_template('', true); } ?>
|
2009-11-13 16:00:25 +00:00
|
|
|
|
|
|
|
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
|
|
|
<?php get_footer() ?>
|