-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patharchive-committee.php
56 lines (47 loc) · 1.54 KB
/
archive-committee.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
<?php get_header(); ?>
<main id="site-content">
<h1 class="archive__title">
<?php echo esc_attr_x('Our committees', 'archive title', 'svid-theme-domain'); ?>
</h1>
<div class="filters">
<div class="filters__label">
<?php echo esc_attr_x('Filter by group:', 'Filter by group committee label', 'svid-theme-domain');?>
<span class="filters__master-switch" data-for="comm-group"><?php echo esc_attr_x('[none]', 'select no committee groups label', 'svid-theme-domain');?></span>
</div>
<div class="filters__group" id="comm-group"
data-for="comm-group--" data-multiple="true">
<?php
$group_options = get_terms('committee-group');
foreach ($group_options as $key => $group_opt):
?>
<label class="filters__tag committees__tag--<?=$group_opt->slug?>"
for="<?=$group_opt->slug?>">
<input type="checkbox" name="committee-group" checked
value="<?=$group_opt->slug?>" id="<?=$group_opt->slug?>"
><?=$group_opt->name?>
</label>
<?php endforeach; ?>
</div>
</div>
<div class="committees__grid">
<?php
if(have_posts()) : while(have_posts()) :
the_post();
$groups = get_the_terms($post, 'committee-group');
$group_class = '';
$group_class_styling = 'comm-group';
$group_count = -1;
if ($groups) {
$group_count = count($groups);
foreach ($groups as $group) {
$group_class .= $group->slug . ' ';
$group_class_styling .= ' comm-group--' . $group->slug;
}
}
include 'inc/small-committee.php';
endwhile; endif;
wp_reset_postdata();
?>
</div>
</main>
<?php get_footer(); ?>