-
Notifications
You must be signed in to change notification settings - Fork 1
/
board.php
132 lines (106 loc) · 3.13 KB
/
board.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php
/*
* Template Name: Board Members Page
* Description: Shows the current board members and openings.
*/
?>
<?php get_header(); ?>
<main class="page-main">
<div class="container main-container page-container">
<div class="horizontal-line-holder">
<h1 class="page-title horizontal-line-value"><?php the_title(); ?></h1>
</div>
<div class="row">
<div class="col-md-9 page-content">
<?php the_post(); ?>
<?php the_content(); ?>
<?php
$boardMembers = get_posts(array(
'post_type' => 'board',
'numberposts' => -1
));
// $boardPositions = ['Co-Chair','Treasurer','Secretary','District 1 Representative','District 2 Representative','District 3 Representative','District 4 Representative','District 5 Representative','Auxiliary','At Large Representative'];
$boardPositions = array(
0 => array(
'title' => 'Co-Chair',
'number' => 2
),
1 => array(
'title' => 'Treasurer',
'number' => 1
),
2 => array(
'title' => 'Secretary',
'number' => 1
),
3 => array(
'title' => 'District 1 Representative',
'number' => 1
),
4 => array(
'title' => 'District 2 Representative',
'number' => 1
),
5 => array(
'title' => 'District 3 Representative',
'number' => 1
),
6 => array(
'title' => 'District 4 Representative',
'number' => 1
),
7 => array(
'title' => 'District 5 Representative',
'number' => 1
),
8 => array(
'title' => 'Auxiliary',
'number' => 1
),
9 => array(
'title' => 'At Large Representative',
'number' => 5
)
);
$CoChair = 0;
$Treasurer = 0;
$Secretary = 0;
$District1Representative = 0;
$District2Representative = 0;
$District3Representative = 0;
$District4Representative = 0;
$District5Representative = 0;
$Auxiliary = 0;
$AtLargeRepresentative = 0;
if($boardMembers){
echo '<ul class="board-members-list">';
foreach($boardPositions as $position){
foreach ($boardMembers as $member){
$id = $member->ID;
if(get_field('bm_title', $id) == $position['title']):
?>
<li class="board-member-list-item">
<h4><?php echo get_field('bm_first_name', $id); ?> <?php echo get_field('bm_last_name', $id); ?></h4>
<span><?php echo get_field('bm_title', $id); ?></span>
</li>
<?php
endif;
}
}
echo '<div style="clear:both;"></div>';
echo '</ul>';
}
?>
</div>
<div class="col-md-3 sidebar-content">
<?php
if(checkForOpenings()){
get_template_part('includes/sidebar','joinboard');
}
get_template_part('includes/sidebar','involved');
?>
</div>
</div>
</div>
</main>
<?php get_footer() ?>