web/wp-content/themes/inove/archive.php
author ymh <ymh.work@gmail.com>
Mon, 22 Mar 2010 16:36:28 +0100
changeset 5 ac511f1ccc8e
parent 1 0d28b7c10758
permissions -rw-r--r--
add hgignore
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
0d28b7c10758 First commit
ymh
parents:
diff changeset
     1
<?php get_header(); ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
     2
<?php
0d28b7c10758 First commit
ymh
parents:
diff changeset
     3
	$options = get_option('inove_options');
0d28b7c10758 First commit
ymh
parents:
diff changeset
     4
	if (function_exists('wp_list_comments')) {
0d28b7c10758 First commit
ymh
parents:
diff changeset
     5
		add_filter('get_comments_number', 'comment_count', 0);
0d28b7c10758 First commit
ymh
parents:
diff changeset
     6
	}
0d28b7c10758 First commit
ymh
parents:
diff changeset
     7
?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
     8
0d28b7c10758 First commit
ymh
parents:
diff changeset
     9
<?php if (is_search()) : ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    10
	<div class="boxcaption"><h3><?php _e('Search Results', 'inove'); ?></h3></div>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    11
	<div class="box"><?php printf( __('Keyword: &#8216;%1$s&#8217;', 'inove'), wp_specialchars($s, 1) ); ?></div>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    12
0d28b7c10758 First commit
ymh
parents:
diff changeset
    13
<?php else : ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    14
	<div class="boxcaption"><h3><?php _e('Archive', 'inove'); ?></h3></div>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    15
	<div class="box">
0d28b7c10758 First commit
ymh
parents:
diff changeset
    16
		<?php
0d28b7c10758 First commit
ymh
parents:
diff changeset
    17
		// If this is a category archive
0d28b7c10758 First commit
ymh
parents:
diff changeset
    18
		if (is_category()) {
0d28b7c10758 First commit
ymh
parents:
diff changeset
    19
			printf( __('Archive for the &#8216;%1$s&#8217; Category', 'inove'), single_cat_title('', false) );
0d28b7c10758 First commit
ymh
parents:
diff changeset
    20
		// If this is a tag archive
0d28b7c10758 First commit
ymh
parents:
diff changeset
    21
		} elseif (is_tag()) {
0d28b7c10758 First commit
ymh
parents:
diff changeset
    22
			printf( __('Posts Tagged &#8216;%1$s&#8217;', 'inove'), single_tag_title('', false) );
0d28b7c10758 First commit
ymh
parents:
diff changeset
    23
		// If this is a daily archive
0d28b7c10758 First commit
ymh
parents:
diff changeset
    24
		} elseif (is_day()) {
0d28b7c10758 First commit
ymh
parents:
diff changeset
    25
			printf( __('Archive for %1$s', 'inove'), get_the_time(__('F jS, Y', 'inove')) );
0d28b7c10758 First commit
ymh
parents:
diff changeset
    26
		// If this is a monthly archive
0d28b7c10758 First commit
ymh
parents:
diff changeset
    27
		} elseif (is_month()) {
0d28b7c10758 First commit
ymh
parents:
diff changeset
    28
			printf( __('Archive for %1$s', 'inove'), get_the_time(__('F, Y', 'inove')) );
0d28b7c10758 First commit
ymh
parents:
diff changeset
    29
		// If this is a yearly archive
0d28b7c10758 First commit
ymh
parents:
diff changeset
    30
		} elseif (is_year()) {
0d28b7c10758 First commit
ymh
parents:
diff changeset
    31
			printf( __('Archive for %1$s', 'inove'), get_the_time(__('Y', 'inove')) );
0d28b7c10758 First commit
ymh
parents:
diff changeset
    32
		// If this is an author archive
0d28b7c10758 First commit
ymh
parents:
diff changeset
    33
		} elseif (is_author()) {
0d28b7c10758 First commit
ymh
parents:
diff changeset
    34
			_e('Author Archive', 'inove');
0d28b7c10758 First commit
ymh
parents:
diff changeset
    35
		// If this is a paged archive
0d28b7c10758 First commit
ymh
parents:
diff changeset
    36
		} elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {
0d28b7c10758 First commit
ymh
parents:
diff changeset
    37
			_e('Blog Archives', 'inove');
0d28b7c10758 First commit
ymh
parents:
diff changeset
    38
		}
0d28b7c10758 First commit
ymh
parents:
diff changeset
    39
		?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    40
	</div>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    41
<?php endif; ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    42
0d28b7c10758 First commit
ymh
parents:
diff changeset
    43
<?php if (have_posts()) : while (have_posts()) : the_post(); update_post_caches($posts); ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    44
	<div class="post" id="post-<?php the_ID(); ?>">
0d28b7c10758 First commit
ymh
parents:
diff changeset
    45
		<h2><a class="title" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    46
		<div class="info">
0d28b7c10758 First commit
ymh
parents:
diff changeset
    47
			<span class="date"><?php the_time(__('F jS, Y', 'inove')) ?></span>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    48
			<?php if ($options['author']) : ?><span class="author"><?php the_author_posts_link(); ?></span><?php endif; ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    49
			<?php edit_post_link(__('Edit', 'inove'), '<span class="editpost">', '</span>'); ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    50
			<span class="comments"><?php comments_popup_link(__('No comments', 'inove'), __('1 comment', 'inove'), __('% comments', 'inove'), '', __('Comments off', 'inove')); ?></span>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    51
			<div class="fixed"></div>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    52
		</div>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    53
		<div class="content">
0d28b7c10758 First commit
ymh
parents:
diff changeset
    54
			<?php the_content(__('Read more...', 'inove')); ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    55
			<div class="fixed"></div>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    56
		</div>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    57
		<div class="under">
0d28b7c10758 First commit
ymh
parents:
diff changeset
    58
			<?php if ($options['categories']) : ?><span class="categories"><?php _e('Categories: ', 'inove'); ?></span><span><?php the_category(', '); ?></span><?php endif; ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    59
			<?php if ($options['tags']) : ?><span class="tags"><?php _e('Tags: ', 'inove'); ?></span><span><?php the_tags('', ', ', ''); ?></span><?php endif; ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    60
		</div>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    61
	</div>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    62
<?php endwhile; else : ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    63
	<div class="errorbox">
0d28b7c10758 First commit
ymh
parents:
diff changeset
    64
		<?php _e('Sorry, no posts matched your criteria.', 'inove'); ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    65
	</div>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    66
<?php endif; ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    67
0d28b7c10758 First commit
ymh
parents:
diff changeset
    68
<div id="pagenavi">
0d28b7c10758 First commit
ymh
parents:
diff changeset
    69
	<?php if(function_exists('wp_pagenavi')) : ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    70
		<?php wp_pagenavi() ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    71
	<?php else : ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    72
		<span class="newer"><?php previous_posts_link(__('Newer Entries', 'inove')); ?></span>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    73
		<span class="older"><?php next_posts_link(__('Older Entries', 'inove')); ?></span>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    74
	<?php endif; ?>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    75
	<div class="fixed"></div>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    76
</div>
0d28b7c10758 First commit
ymh
parents:
diff changeset
    77
0d28b7c10758 First commit
ymh
parents:
diff changeset
    78
<?php get_footer(); ?>