more archive cleanup

This commit is contained in:
John Bintz 2009-07-13 05:18:25 -04:00
parent 8ce616dac4
commit dc62559476
4 changed files with 65 additions and 66 deletions

View File

@ -1,70 +1,21 @@
<?php get_header() ?> <?php get_header() ?>
<div id="content" class="archive"> <div id="content" class="archive">
<?php if (have_posts()) {
<?php if (have_posts()) : ?> include(dirname(__FILE__) . '/partials/archive-header.inc');
<div class="post-page-head"></div> // why can't wordpress allow for post date asc sorting out of the box...
<div class="post-page">
$posts = query_posts($query_string.'&order=asc');
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?> while (have_posts()) {
<?php /* Category Archive */ if (is_category()) { ?> the_post();
<div class="content"><h2 class="pagetitle">Archive for &#8216;<?php single_cat_title() ?>&#8217;</h2></div>
<?php /* Tag Archive */ } elseif( is_tag() ) { ?> if (in_comic_category()) {
<div class="content"><h2 class="pagetitle">Posts Tagged &#8216;<?php single_tag_title() ?>&#8217;</h2></div> include(dirname(__FILE__) . '/partials/archive-comic-post.inc');
<?php /* Daily Archive */ } elseif (is_day()) { ?> } else {
<div class="content"><h2 class="pagetitle">Archive for <?php the_time('F jS, Y') ?></h2></div> include(dirname(__FILE__) . '/partials/archive-blog-post.inc');
<?php /* Monthly Archive */ } elseif (is_month()) { ?> }
<div class="content"><h2 class="pagetitle">Archive for <?php the_time('F, Y') ?></h2></div> } ?>
<?php /* Yearly Archive */ } elseif (is_year()) { ?>
<div class="content"><h2 class="pagetitle">Archive for <?php the_time('Y') ?></h2></div>
<?php /* Author Archive */ } elseif (is_author()) { ?>
<div class="content"><h2 class="pagetitle">Author Archive</h2></div>
<?php /* Paged Archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<div class="content"><h2 class="pagetitle">Archives</h2></div>
<?php } ?>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>
<?php $posts = query_posts($query_string.'&order=asc');
while (have_posts()) : the_post() ?>
<?php if (in_comic_category()) { ?>
<div class="post-comic-head"></div>
<div class="post-comic">
<div class="comicarchiveframe" style="width:<?php echo $archive_comic_width; ?>px;">
<a href="<?php the_permalink() ?>">
<?php do_action('show_archive') ?>
<br />
<h3><?php the_title() ?></h3>
<small><?php the_time('F jS, Y') ?></small></a>
</div>
<br class="clear-margins" />
</div>
<div class="post-comic-foot"></div>
<?php } else { ?>
<div class="post-head"></div>
<div class="post archive">
<h3 id="post-<?php the_ID() ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute() ?>"><?php the_title() ?></a></h3>
<div class="postdate"><?php the_time('F jS, Y') ?></div>
<div class="entry"><?php the_content() ?></div>
<div class="tags">
<?php the_tags('&#9492; Tags: ', ', ', ''); edit_post_link('Edit Post', ' [ ', ' ] ') ?>
</div>
<div class="comment-link">
<?php if ('open' == $post->comment_status) { comments_popup_link('&ldquo;Comment&rdquo;', '&ldquo;1 Comment&rdquo;', '&ldquo;% Comments&rdquo;'); } ?>
</div>
<br class="clear-margins" />
</div>
<div class="post-foot"></div>
<?php } ?>
<?php endwhile; ?>
<div class="pagenav"> <div class="pagenav">
<div class="pagenav-right"><?php next_posts_link('Next Page &rsaquo;') ?></div> <div class="pagenav-right"><?php next_posts_link('Next Page &rsaquo;') ?></div>
@ -72,7 +23,7 @@
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<?php else : ?> <?php } else { ?>
<div class="post-head"></div> <div class="post-head"></div>
<div class="post"> <div class="post">
@ -83,7 +34,7 @@
</div> </div>
<div class="post-foot"></div> <div class="post-foot"></div>
<?php endif; ?> <?php } ?>
</div> </div>

View File

@ -0,0 +1,14 @@
<div class="post-head"></div>
<div class="post archive">
<h3 id="post-<?php the_ID() ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute() ?>"><?php the_title() ?></a></h3>
<div class="postdate"><?php the_time('F jS, Y') ?></div>
<div class="entry"><?php the_content() ?></div>
<div class="tags">
<?php the_tags('&#9492; Tags: ', ', ', ''); edit_post_link('Edit Post', ' [ ', ' ] ') ?>
</div>
<div class="comment-link">
<?php if ('open' == $post->comment_status) { comments_popup_link('&ldquo;Comment&rdquo;', '&ldquo;1 Comment&rdquo;', '&ldquo;% Comments&rdquo;'); } ?>
</div>
<br class="clear-margins" />
</div>
<div class="post-foot"></div>

View File

@ -0,0 +1,13 @@
<div class="post-comic-head"></div>
<div class="post-comic">
<div class="comicarchiveframe">
<a href="<?php the_permalink() ?>">
<?php do_action('show_archive') ?>
<br />
<h3><?php the_title() ?></h3>
<small><?php the_time('F jS, Y') ?></small>
</a>
</div>
<br class="clear-margins" />
</div>
<div class="post-comic-foot"></div>

View File

@ -0,0 +1,21 @@
<div class="post-page-head"></div>
<div class="post-page">
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* Category Archive */ if (is_category()) { ?>
<div class="content"><h2 class="pagetitle">Archive for &#8216;<?php single_cat_title() ?>&#8217;</h2></div>
<?php /* Tag Archive */ } elseif( is_tag() ) { ?>
<div class="content"><h2 class="pagetitle">Posts Tagged &#8216;<?php single_tag_title() ?>&#8217;</h2></div>
<?php /* Daily Archive */ } elseif (is_day()) { ?>
<div class="content"><h2 class="pagetitle">Archive for <?php the_time('F jS, Y') ?></h2></div>
<?php /* Monthly Archive */ } elseif (is_month()) { ?>
<div class="content"><h2 class="pagetitle">Archive for <?php the_time('F, Y') ?></h2></div>
<?php /* Yearly Archive */ } elseif (is_year()) { ?>
<div class="content"><h2 class="pagetitle">Archive for <?php the_time('Y') ?></h2></div>
<?php /* Author Archive */ } elseif (is_author()) { ?>
<div class="content"><h2 class="pagetitle">Author Archive</h2></div>
<?php /* Paged Archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<div class="content"><h2 class="pagetitle">Archives</h2></div>
<?php } ?>
<br class="clear-margins" />
</div>
<div class="post-page-foot"></div>