-
Notifications
You must be signed in to change notification settings - Fork 1
/
archive.php
85 lines (55 loc) · 2.55 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
<?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( __( 'Category: %s', 'fukasawa' ), '' . single_cat_title( '', false ) . '' ); ?>
<?php elseif ( is_tag() ) : ?>
<?php printf( __( 'Tag: %s', 'fukasawa' ), '' . 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', 'fukasawa' ), $curauth->display_name ); ?>
<?php else : ?>
<?php _e( 'Archive', 'fukasawa' ); ?>
<?php endif; ?>
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
if ( "1" < $wp_query->max_num_pages ) : ?>
<span><?php printf( __('Page %s of %s', 'fukasawa'), $paged, $wp_query->max_num_pages ); ?></span>
<div class="clear"></div>
<?php endif; ?></h4>
</div> <!-- /section-inner -->
<!--//XTEC ************ AFEGIT - Added category and tag description
//2016.02.05 @sarjona-->
<?php if ( is_category() ) : ?>
<?php $category_description = category_description(); if(!empty($category_description)) {echo '<div class="category-description">'.$category_description.'</div>';} ?>
<?php elseif ( is_tag() ) : ?>
<?php $tag_description = tag_description(); if(!empty($tag_description)) {echo '<div class="tag-description">'.$tag_description.'</div>';} ?>
<?php endif; ?>
<!--//************ FI-->
</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( '« ' . __('Older posts', 'fukasawa')); ?>
<?php echo get_previous_posts_link( __('Newer posts', 'fukasawa') . ' »'); ?>
<div class="clear"></div>
</div>
</div> <!-- /post-nav archive-nav -->
<?php endif; ?>
<?php endif; ?>
</div> <!-- /content -->
<?php get_footer(); ?>