-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive.php
More file actions
58 lines (51 loc) · 1.62 KB
/
Copy patharchive.php
File metadata and controls
58 lines (51 loc) · 1.62 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
49
50
51
52
53
54
55
56
57
58
<?php
/**
* Norton Simple — Archive Template
*
* @package Norton_Simple
*/
defined( 'ABSPATH' ) || exit;
get_header(); ?>
<div class="site-content">
<main class="main-content" id="main">
<h1 class="archive-title">
<?php
if ( is_category() ) {
echo '[CAT] ';
single_cat_title();
} elseif ( is_tag() ) {
echo '[TAG] ';
single_tag_title();
} elseif ( is_author() ) {
echo '[AUTHOR] ' . esc_html( get_the_author() );
} elseif ( is_year() ) {
echo '[YEAR] ' . esc_html( get_the_date( 'Y' ) );
} elseif ( is_month() ) {
echo '[MONTH] ' . esc_html( get_the_date( 'F Y' ) );
} else {
esc_html_e( '[ARCHIVE]', 'norton-simple' );
}
?>
</h1>
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', get_post_type() );
endwhile;
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
<?php
the_posts_pagination( array(
'mid_size' => 2,
'prev_text' => esc_html__( '[← PREV]', 'norton-simple' ),
'next_text' => esc_html__( '[NEXT →]', 'norton-simple' ),
'screen_reader_text' => esc_html__( 'Posts navigation', 'norton-simple' ),
) );
?>
</main>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>