This repository has been archived by the owner on Mar 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy patharchive.php
46 lines (38 loc) · 2 KB
/
archive.php
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
<?php get_header(); ?>
<div id="content" class="section">
<?php arras_above_content() ?>
<?php is_tag(); if ( have_posts() ) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php if ( is_category() ) : ?>
<h1 class="archive-title"><?php printf( __('%s Archive', 'arras'), single_cat_title('', false) ) ?></h1>
<?php elseif ( is_tag() ) : ?>
<h1 class="archive-title"><?php printf( __('%s Archive', 'arras'), single_tag_title('', false) ) ?></h1>
<?php elseif ( is_tax() ) : $term = $wp_query->get_queried_object(); ?>
<h1 class="archive-title"><?php printf( __('%s Archive', 'arras'), $term->name ) ?></h1>
<?php elseif ( is_day() ) : ?>
<h1 class="archive-title"><?php printf( __('Archive for %s', 'arras'), get_the_time( __('F jS, Y', 'arras') ) ) ?></h1>
<?php elseif ( is_month() ) : ?>
<h1 class="archive-title"><?php printf( __('Archive for %s', 'arras'), get_the_time( __('F, Y', 'arras') ) ) ?></h1>
<?php elseif ( is_year() ) : ?>
<h1 class="archive-title"><?php printf( __('Archive for %s', 'arras'), get_the_time( __('Y', 'arras') ) ) ?></h1>
<?php elseif ( is_author() ) : ?>
<h1 class="archive-title"><?php _e('Author Archive', 'arras') ?></h1>
<?php else : ?>
<h1 class="archive-title"><?php _e('Archives', 'arras') ?></h1>
<?php endif; ?>
<div id="archive-posts">
<?php arras_render_posts( null, arras_get_option('archive_display') ) ?>
<?php if(function_exists('wp_pagenavi')) wp_pagenavi(); else { ?>
<div class="navigation clearfix">
<div class="floatleft"><?php next_posts_link( __('Older Entries', 'arras') ) ?></div>
<div class="floatright"><?php previous_posts_link( __('Newer Entries', 'arras') ) ?></div>
</div>
<?php } ?>
</div><!-- #archive-posts -->
<?php else : ?>
<?php arras_post_notfound() ?>
<?php endif; ?>
<?php arras_below_content() ?>
</div><!-- #content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>