public
Description: A Refined WordPress Theme
Homepage: http://curtishenson.com/checkmate
Clone URL: git://github.com/curtishenson/checkmate.git
checkmate / archive.php
100644 92 lines (68 sloc) 3.128 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php get_header(); ?>
 
<div class="container archive">
<?php //Author Header
if (is_author()) {
// gather author information
if(get_query_var('author_name')) :
$curauth = get_userdatabylogin(get_query_var('author_name'));
else:
$curauth = get_userdata(get_query_var('author'));
endif; ?>
<div class="author span-24 last">
<h2>Posts by <?php echo $curauth->display_name; //display name set in user options ?></h2>
 
<?php if (function_exists('get_avatar')) {
echo get_avatar( $curauth->user_email, '80'); } ?>
<p><?php echo $curauth->description; ?></p>
</div>
<?php } //Category Header
elseif (is_category()) { ?>
<h2>You are viewing the <strong><em><?php single_cat_title(); ?></em></strong> category</h2>
<?php } //Tag Header
elseif (is_tag()) { ?>
<h2>You are viewing the <strong><em><?php single_tag_title(); ?></em></strong> tag</h2>
<?php } //Archive Header
else { ?>
<h2>You are viewing the Archives</h2>
<?php } ?>
<div>
<select name="archive-dropdown" onChange='document.location.href=this.options[this.selectedIndex].value;'>
<option value=""><?php echo attribute_escape(__('View By Month')); ?></option>
<?php wp_get_archives('type=monthly&format=option&show_post_count=1'); ?></select>
<select name="archive-dropdown" onChange='document.location.href=this.options[this.selectedIndex].value;'>
<option value=""><?php echo attribute_escape(__('View By Year')); ?></option>
<?php wp_get_archives('type=yearly&format=option&show_post_count=1'); ?></select>
<form action="<?php bloginfo('url'); ?>/" method="get">
<?php
$select = wp_dropdown_categories('show_option_none=View By Category&show_count=1&hierarchical=1&echo=0');
$select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
echo $select;
?>
<noscript><input type="submit" value="View" /></noscript>
</form>
</div>
<?php cm_left_column() ?>
<div class="blog span-14">
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
 
<div class="meta">
<ul>
<li class="date">Posted On <?php the_time('M j, Y') ?></li>
<li class="comment"> | <a href="<?php comments_link(); ?>"><?php comments_number('0 Comments','1 Comment','% Comments'); ?></a></li>
</ul>
</div>
 
<div <?php if (function_exists('post_class')) { post_class(); } else { echo 'class="post"'; } ?>>
<?php the_content('Continue Reading'); ?>
</div>
 
<?php endwhile; else : ?>
 
<h2>Not Found</h2>
<p>Sorry, but there were no posts found.</p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
 
<?php endif; ?>
<div class="navigation clearfix">
<span class="alignleft"><?php posts_nav_link('','','&laquo; Previous Entries') ?></span>
<span class="alignright"><?php posts_nav_link('','Newer Entries &raquo;','') ?></span>
</div>
</div>
<?php cm_sidebar(); ?>
</div><?php //closes container ?>
 
<?php get_footer(); ?>