-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.php
executable file
·133 lines (91 loc) · 4.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
<?php get_header(); ?>
<div class="archive-page-content page-content">
<div class="inner wrap clearfix">
<div class="main" role="main" itemscope itemprop="mainContentOfPage" itemtype="http://schema.org/Blog">
<header class="main-header">
<h1 class="title">
<?php
if (is_category()) :
printf(__('Category: %s', 'walkertheme'), '<span>' . single_cat_title('', false) . '</span>');
elseif (is_tag()) :
printf(__('Tag: %s', 'walkertheme'), '<span>' . single_tag_title('', false) . '</span>');
elseif (is_author()) :
the_post();
printf(__('Author: %s', 'walkertheme'), '<span class="vcard"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '" title="' . esc_attr(get_the_author()) . '" rel="me">' . get_the_author() . '</a></span>');
rewind_posts();
elseif (is_day()) :
printf(__('Day: %s', 'walkertheme'), '<span>' . get_the_date() . '</span>');
elseif (is_month()) :
printf(__('Month: %s', 'walkertheme'), '<span>' . get_the_date('F Y') . '</span>');
elseif (is_year()) :
printf(__('Year: %s', 'walkertheme'), '<span>' . get_the_date('Y') . '</span>');
elseif (is_tax('post_format', 'post-format-aside')) :
_e('Asides', 'walkertheme');
elseif (is_tax('post_format', 'post-format-gallery')) :
_e('Galleries', 'walkertheme');
elseif (is_tax('post_format', 'post-format-image')) :
_e('Images', 'walkertheme');
elseif (is_tax('post_format', 'post-format-video')) :
_e('Videos', 'walkertheme');
elseif (is_tax('post_format', 'post-format-quote')) :
_e('Quotes', 'walkertheme');
elseif (is_tax('post_format', 'post-format-link')) :
_e('Links', 'walkertheme');
elseif (is_tax('post_format', 'post-format-status')) :
_e('Statuses', 'walkertheme');
elseif (is_tax('post_format', 'post-format-audio')) :
_e('Audio', 'walkertheme');
elseif (is_tax('post_format', 'post-format-chat')) :
_e('Chats', 'walkertheme');
else :
_e('Archives', 'walkertheme');
endif;
?>
</h1>
<?php
if (is_category()) :
$category_description = category_description();
if (! empty($category_description)) :
echo apply_filters('category_archive_meta', '<div class="taxonomy-description">' . $category_description . '</div>');
endif;
elseif (is_tag()) :
$tag_description = tag_description();
if (! empty($tag_description)) :
echo apply_filters('tag_archive_meta', '<div class="taxonomy-description">' . $tag_description . '</div>');
endif;
endif;
?>
</header>
<div class="main-content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class("archive-post"); ?>>
<header class="entry-header">
<h1 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
<p class="meta"><?php printf(__('Posted on <time class="updated" datetime="%1$s" pubdate>%2$s</time> by <span class="author">%3$s</span> <span class="amp">&</span> filed under %4$s.', 'walkertheme'), get_the_time('Y-m-j'), get_the_time(get_option('date_format')), get_the_author_link(get_the_author_meta('ID')), get_the_category_list(', ')); ?></p>
</header>
<div class="entry-excerpt clearfix">
<?php the_post_thumbnail('walker-thumb-300'); ?>
<?php the_excerpt(); ?>
</div>
</article>
<?php endwhile; ?>
</div>
<?php if (function_exists('walker_pagination')) { walker_pagination(); } ?>
<?php else : ?>
<section class="entry entry-missing">
<header class="entry-header">
<h1 class="title"><?php _e("Oops, Post Not Found!", "walkertheme"); ?></h1>
</header>
<div class="entry-content">
<p><?php _e("Uh Oh. Something is missing. Try double checking things.", "walkertheme"); ?></p>
</div>
<footer class="entry-footer">
<p><?php _e("This error message is generated by robot.", "walkertheme"); ?></p>
</footer>
</section>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
</div>
</div>
<?php get_footer(); ?>