-
Notifications
You must be signed in to change notification settings - Fork 4
/
archive.php
60 lines (39 loc) · 1.08 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
<?php get_header(); ?>
<?php
global $post;
if( is_archive() && have_posts() ) : ?>
<h1 class="pad-2-1 aligncenter">
<?php
if( is_category() ) :
single_cat_title();
elseif( is_tag() ) :
printf( __( '#%s', 'kouki' ), single_tag_title( '', false ) );
elseif( is_day() ) :
the_time('M j, Y');
elseif( is_month() ) :
the_time( 'F Y' );
elseif( is_year() ) :
the_time( 'Y' );
elseif( is_author() ) :
$current_author = $wp_query->get_queried_object();
esc_html_e( 'Author: ', 'kouki' ); echo $current_author->display_name;
elseif( isset( $_GET['paged'] ) && !empty( $_GET['paged'] ) ) :
esc_html_e( 'Archive', 'kouki' );
else :
the_title();
endif; ?>
</h1>
<?php endif; ?>
<?php if ( have_posts() ) : ?>
<div class="masonry-wrapper">
<div id="content" class="js-masonry">
<?php while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content', 'masonry' );
endwhile; ?>
</div>
</div>
<?php kouki_paging_nav();
else :
get_template_part( 'template-parts/content', 'none' );
endif; ?>
<?php get_footer(); ?>