-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive.php
More file actions
90 lines (59 loc) · 2.94 KB
/
archive.php
File metadata and controls
90 lines (59 loc) · 2.94 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
82
83
84
85
86
87
88
89
90
<?php
/**
* Archive template
*/
get_header();
$queried_object = get_queried_object();
?>
<div class="site-content">
<article <?php post_class('wrap'); ?>>
<section class="section">
<div class="flex has-sidebar u-container">
<?php get_template_part( 'partials/menu-ui' ); ?>
<div class="sidebar-masthead section__sidebar flex__item">
<?php get_template_part( 'partials/masthead' ); ?>
</div>
<div class="section__content flex__item">
<div class="page-header">
<h1 class="page-title h2 u-mt-pull">
<? if ( is_post_type_archive() ) {
post_type_archive_title();
} else {
the_archive_title();
} ?>
</h1>
</div>
<?php get_template_part( 'partials/filters', $queried_object->name ); ?>
</div> <!-- .section__content -->
</div><!-- .u-container -->
</section>
<section class="section">
<div class="flex u-container">
<div class="section__content u-width-12 flex__item">
<?php if ( have_posts() ) : ?>
<?php if ( 1 < get_query_var('paged') ) : ?>
<div class="posts-pagination">
<?php the_posts_pagination( array( 'mid_size' => 2 ) ); ?>
<hr>
</div>
<?php endif; ?>
<div class="u-clearfix">
<?php while ( have_posts() ) : the_post();
$post_type = get_post_type();
$post_class = array( 'u-span-4 u-mt-4 preview' ); ?>
<article <?php post_class( implode( ' ', $post_class ) ); ?>>
<?php get_template_part( 'partials/content-preview', $post_type ); ?>
</article>
<?php endwhile; ?>
</div>
<hr class="u-mt-4"/>
<div class="posts-pagination u-pt-1">
<?php the_posts_pagination( array( 'mid_size' => 2 ) ); ?>
</div>
<?php endif; ?>
</div> <!-- .section__content -->
</div><!-- .u-container -->
</section>
</article>
</div>
<?php get_footer();