-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive.php
More file actions
executable file
·48 lines (48 loc) · 1.75 KB
/
archive.php
File metadata and controls
executable file
·48 lines (48 loc) · 1.75 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
<?php get_header(); ?>
<div class="content">
<div class="page-title">
<div class="section-inner">
<h4>
<?php if (is_day()) : ?>
<?php echo get_the_date(get_option('date_format')); ?>
<?php elseif (is_month()) : ?>
<?php echo get_the_date('F Y'); ?>
<?php elseif (is_year()) : ?>
<?php echo get_the_date('Y'); ?>
<?php elseif (is_category()) : ?>
<?php printf(__('%s', 'masonry'), '' . single_cat_title('', false) . ''); ?>
<?php elseif (is_tag()) : ?>
<?php printf(__('%s', 'masonry'), '' . single_tag_title('', false) . ''); ?>
<?php elseif (is_author()) : ?>
<?php $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author)); ?>
<?php printf(__('Author: %s', 'masonry'), $curauth->display_name); ?>
<?php else : ?>
<?php _e('Archive', 'masonry'); ?>
<?php endif; ?>
</h4>
</div>
<!-- /section-inner -->
</div>
<!-- /page-title -->
<?php if (have_posts()) : ?>
<?php rewind_posts(); ?>
<div class="posts" id="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">
<div class="section-inner">
<?php echo get_next_posts_link('« ' . __('Previous', 'masonry')); ?>
<?php echo get_previous_posts_link(__('Next', 'masonry') . ' »'); ?>
<div class="clear"></div>
</div>
</div>
<!-- /post-nav archive-nav -->
<?php endif; ?>
<?php endif; ?>
</div>
<!-- /content -->
<?php get_footer(); ?>