-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive.php
More file actions
74 lines (47 loc) · 2.18 KB
/
archive.php
File metadata and controls
74 lines (47 loc) · 2.18 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
<?php get_header(); ?>
<div class="wrapper">
<div class="wrapper-inner section-inner">
<div class="page-title">
<?php if ( is_day() ) : ?>
<h5><?php _e( 'Date:', 'garfunkel' ); ?> <?php echo get_the_date(); ?></h5>
<?php elseif ( is_month() ) : ?>
<h5><?php _e( 'Month:', 'garfunkel' ); ?> <?php echo get_the_date('F Y'); ?></h5>
<?php elseif ( is_year() ) : ?>
<h5><?php _e( 'Year:', 'garfunkel' ); ?> <?php echo get_the_date('Y'); ?></h5>
<?php elseif ( is_category() ) : ?>
<h5><?php _e( 'Category:', 'garfunkel' ); ?> <?php echo single_cat_title( '', false ); ?></h5>
<?php elseif ( is_tag() ) : ?>
<h5><?php _e( 'Tag:', 'garfunkel' ); ?> <?php echo single_tag_title( '', false ); ?></h5>
<?php elseif ( is_author() ) : ?>
<?php $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author)); ?>
<h5><?php _e( 'Author:', 'garfunkel' ); ?> <?php echo $curauth->display_name; ?></h5>
<?php else : ?>
<h5><?php _e( 'Archive', 'garfunkel' ); ?></h5>
<?php endif; ?>
<?php
$tag_description = tag_description();
if ( ! empty( $tag_description ) )
echo apply_filters( 'tag_archive_meta', '<div class="page-description">' . $tag_description . '</div>' );
?>
</div> <!-- /page-title -->
<div class="content">
<?php if ( have_posts() ) : ?>
<div class="posts">
<?php rewind_posts(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
</div> <!-- /posts -->
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div class="archive-nav">
<?php echo get_next_posts_link( '« ' . __('Older posts', 'garfunkel')); ?>
<?php echo get_previous_posts_link( __('Newer posts', 'garfunkel') . ' »'); ?>
<div class="clear"></div>
</div> <!-- /post-nav archive-nav -->
<div class="clear"></div>
<?php endif; ?>
<?php endif; ?>
</div> <!-- /content -->
</div> <!-- /wrapper-inner -->
</div> <!-- /wrapper -->
<?php get_footer(); ?>