-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy patharchive.php
77 lines (76 loc) · 2.14 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
<?php
get_header();
$category_query_info = get_queried_object();
$found_posts = $category_query_info->count;
?>
<div class="wrapper">
<div class="wrapper-padded">
<div class="wrapper-padded-more-650">
<div class="content-styled plain-page">
<h1 class="aligncenter">
<?php single_term_title(); ?>
</h1>
<?php
if (term_description()) {
echo term_description();
}
?>
</div>
</div>
</div>
</div>
<div class="wrapper">
<div class="wrapper-padded">
<?php
$boxes_grid = get_field('boxes_grid', 'options');
$items_per_row = get_field('items_per_row', 'options');
if ($boxes_grid === 'grid-flexbox'):
if ($items_per_row === 'three-items') {
$grid_blocks = 'flex-hold-3';
}
if ($items_per_row === 'two-items') {
$grid_blocks = 'flex-hold-2';
}
?>
<div class="flex-hold <?php echo $grid_blocks; ?> margins-wide verticalize grid-infinite">
<?php
if (have_posts()):
while (have_posts()):
the_post();
include(locate_template('template-parts/grid/post.php'));
endwhile;
endif;
wp_reset_postdata(); ?>
</div>
<?php
else:
if ($items_per_row === 'three-items') {
$grid_blocks = 'masonry-three';
}
if ($items_per_row === 'two-items') {
$grid_blocks = 'masonry-two';
}
?>
<div class="masonry-grid <?php echo $grid_blocks; ?> grid-infinite">
<div class="grid-sizer"></div>
<?php
if (have_posts()):
while (have_posts()):
the_post();
include(locate_template('template-parts/grid/post.php'));
endwhile;
endif;
wp_reset_postdata(); ?>
</div>
<?php endif; ?>
<?php include(locate_template('template-parts/grid/infinite-message.php')); ?>
</div>
</div>
<?php if ($found_posts > $posts_per_page): ?>
<div class="wrapper aligncenter">
<div class="view-more-button view-more-button-js">
<?php _e('View more', 'paperplane-photography-theme'); ?>
</div>
</div>
<?php endif; ?>
<?php get_footer(); ?>