forked from N-Jaro/iguide-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-team-members.php
80 lines (68 loc) · 2.96 KB
/
page-team-members.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
<?php
get_header();
?>
<div class="page-title tw-w-full tw-block tw-relative tw--mt-[200px] tw-pt-[200px]" >
<div class="tw-container tw-mx-auto tw-px-4 tw-h-min-[200px] tw-pb-[80px] tw-pt-12">
<div class="tw-border-l-8 tw-pl-3 tw-border-ig-orange tw-text-white tw-font-semibold tw-text-2xl">
<h1><?php the_title();?></h1>
</div>
</div>
<div class="custom-shape-divider-bottom-1675786129">
<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"
preserveAspectRatio="none">
<path d="M1200 120L0 16.48 0 0 1200 0 1200 120z" class="shape-fill"></path>
</svg>
</div>
</div>
<div class="page-content tw-w-full tw-flex tw-relative tw-bg-white tw-mt-5 tw-mb-16">
<div class="tw-container tw-mx-auto tw-px-4 tw-py-6">
<?php
$team_members_args = array(
'posts_per_page'=> -1,
'post_type' => 'people',
'tax_query' => array(
array(
'taxonomy' => 'position',
'field' => 'slug',
'terms' => array( 'advisory', 'council-of-geospatial-leaders'),
'operator' => 'NOT IN',
)
),
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'is_alumni',
'value' => '0', // Explicitly include non-alumni
'compare' => '=', // Must be exactly 0 (false)
),
array(
'key' => 'is_alumni',
'compare' => 'NOT EXISTS', // Include people where 'is_alumni' is missing (NULL)
),
),
'meta_key' => 'last_name', // Order by last name
'orderby' => 'meta_value',
'order' => 'ASC',
);
$teamMembersQuery = new WP_Query($team_members_args);
?>
<div class="row justify-content-center">
<?php if ( $teamMembersQuery->have_posts() ) :?>
<?php while ( $teamMembersQuery->have_posts() ) : $teamMembersQuery->the_post(); ?>
<div class="col-6 col-sm-4 col-md-2 col-lg-2">
<div class="card people-card ">
<a href="<?php the_field("profile_url"); ?>" class="stretched-link" target="_new"><div class="card-img-top box-shadow" style="background-image: url('<?php the_field('photo'); ?>');"></div></a>
<div class="card-body ">
<h5 class="card-title name "><?php the_title(); ?></h5>
<p class="card-text affiliation "><?php the_field('affiliation'); ?></p>
</div>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
</div>
<?php
get_footer();
?>