-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patharchive.php
151 lines (114 loc) · 3.54 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
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?php get_header();?>
<div class="wrapper">
<div class="wrapper-inner section-inner">
<div class="page-title">
<?php if ( is_day() ) : ?>
<h5><?php printf(
_n(
'%s Item From Date',
'%s Items From Date',
$wp_query->found_posts,
'garfunkel'
),
number_format_i18n( $wp_query->found_posts )
);?> <?php echo get_the_date(); ?></h5>
<?php elseif ( is_month() ) : ?>
<h5><?php printf(
_n(
'%s Item From Month',
'%s Items From Month',
$wp_query->found_posts,
'garfunkel'
),
number_format_i18n( $wp_query->found_posts )
);?> <?php echo get_the_date('F Y'); ?></h5>
<?php elseif ( is_year() ) : ?>
<h5><?php printf(
_n(
'%s Item From Year',
'%s Items From Year',
$wp_query->found_posts,
'garfunkel'
),
number_format_i18n( $wp_query->found_posts )
);?> <?php echo get_the_date('Y'); ?></h5>
<?php elseif ( is_category() ) : ?>
<h5><?php printf(
_n(
'%s Item From Category',
'%s Items From Category',
$wp_query->found_posts,
'garfunkel'
),
number_format_i18n( $wp_query->found_posts )
);?> "<?php echo single_cat_title( '', false ); ?>"</h5>
<?php elseif ( is_tag() ) : ?>
<h5><?php printf(
_n(
'%s Item Tagged',
'%s Items Tagged',
$wp_query->found_posts,
'garfunkel'
),
number_format_i18n( $wp_query->found_posts )
);?> "<?php echo single_tag_title( '', false ); ?>"</h5>
<?php
$tag_description = tag_description();
if ( ! empty( $tag_description ) ) {
echo apply_filters( 'tag_archive_meta', '<div class="page-description">' . $tag_description . '</div>' );
}
?>
<?php elseif ( is_tax( 'post_format' ) ) : ?>
<h5><?php printf(
_n(
'%s Item of Media Type',
'%s Items of Media Type',
$wp_query->found_posts,
'garfunkel'
),
number_format_i18n( $wp_query->found_posts )
);?> "<?php echo single_cat_title( '', false ); ?>"</h5>
<?php elseif ( is_author() ) :
$curauth = ( isset( $_GET['author_name'] ) ) ? get_user_by( 'slug', $author_name) : get_userdata( intval( $author ) ); ?>
<h5><?php printf(
_n(
'%s Item by Author',
'%s Items by Author',
$wp_query->found_posts,
'garfunkel'
),
number_format_i18n( $wp_query->found_posts )
);?> <?php echo $curauth->display_name; ?></h5>
<?php else : ?>
<h5><?php printf(
_n(
'%s Item in Archive',
'%s Items in Archive',
$wp_query->found_posts,
'garfunkel'
),
number_format_i18n( $wp_query->found_posts )
);?> </h5>
<?php endif?>
</div><!-- .page-title .archive-title -->
<div class="content">
<?php if ( have_posts() ) : ?>
<div class="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 Items', 'garfunkel' ) ); ?>
<?php echo get_previous_posts_link( __( 'Newer Items', 'garfunkel' ) . ' »' ); ?>
<div class="clear"></div>
</div><!-- .post-nav archive-nav -->
<div class="clear"></div>
<?php endif; ?>
<?php endif; ?>
</div><!-- .content -->
<?php get_sidebar(); ?>
</div><!-- .wrapper-inner -->
</div><!-- .wrapper -->
<?php get_footer(); ?>