-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy patharchive.php
More file actions
81 lines (60 loc) · 1.62 KB
/
archive.php
File metadata and controls
81 lines (60 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
/**
* Archive Template
*
* This is the fallback archive template which works for all archive types if
* there are no specific archive templates. If there are other templates, for
* example category.php or tag.php then these will be used instead.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Granule
* @subpackage Template
* @author Ben Gillbanks <ben@prothemedesign.com>
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License
*/
get_header();
?>
<main id="main">
<?php
if ( have_posts() ) {
?>
<header class="entry-archive-header">
<?php
the_archive_title( '<h1 class="entry-title entry-archive-title">', '</h1>' );
the_archive_description( '<div class="category-description">', '</div>' );
if ( is_post_type_archive( 'jetpack-portfolio' ) || is_tax( 'jetpack-portfolio-type' ) ) {
granule_project_terms();
}
?>
</header>
<div id="infinite-scroll" class="content-masonry-wrapper">
<div id="main-content" class="main-content content-posts content-masonry">
<?php
while ( have_posts() ) {
the_post();
get_template_part( 'parts/content', 'format-' . get_post_format() );
}
?>
</div>
</div>
<?php
the_posts_pagination(
array(
'mid_size' => 2,
'prev_text' => esc_html__( 'Newer', 'granule' ),
'next_text' => esc_html__( 'Older', 'granule' ),
'before_page_number' => '<span class="screen-reader-text"> ' . __( 'page', 'granule' ) . ' </span>',
)
);
} else {
?>
<div class="main-content">
<?php get_template_part( 'parts/content-empty' ); ?>
</div>
<?php
}
?>
</main>
<?php
get_footer();