-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaxonomy-role.php
More file actions
65 lines (58 loc) · 2.84 KB
/
taxonomy-role.php
File metadata and controls
65 lines (58 loc) · 2.84 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
<?php get_header(); ?>
<div class="site-content">
<section class="section section--staff-member u-bg-light-gray">
<div class="section__content u-container">
<header class="section__header">
<h1 class="section-title"><?php single_term_title(); ?></h1>
</header>
<div class="section__body u-text-center">
<?php if( is_tax( 'role', 'board' ) ) :
$board_page = get_page_by_title( 'Board' );
?>
<a href="<?php echo get_permalink( $board_page->ID ); ?>" class="button module-button">Board of Trustees Login</a>
<?php endif; ?>
<?php
if ( have_posts() ) :
$cnt = 0;
?>
<ul class="staff-member--list u-list-nostyle">
<?php
while ( have_posts() ) : the_post();
$mod = $cnt % 2;
$imagePos = 'image--positionner-left';
if($cnt % 2)
{
$imagePos = 'image--positionner-right';
}
$cnt++;
?>
<li class="u-mt-3 staff-member--item">
<?php if ( has_term( 'board', 'role' ) ) : ?>
<div class="u-display-inline-block staff-member--name-title">
<span class="h2"><?php the_title(); ?></span>
<span class="h3"><?php echo get_field('person_title'); ?></span>
</div>
<?php else : ?>
<a href="<?php the_permalink(); ?>" class="u-display-inline-block staff-member--name-title">
<span class="h2"><?php the_title(); ?></span>
<span class="h3"><?php echo get_field('person_title'); ?></span>
</a>
<?php endif; ?>
<div class="image--positionner <?php echo $imagePos; ?>" style="background-image:url('<?php echo wp_get_attachment_image_src( get_post_thumbnail_id(), 'large')[0];?>');"></div>
</li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
</div>
</div>
</section>
</div>
<?php get_footer(); ?>
<script>
var StaffMemberList;
jQuery(document).ready(function()
{
StaffMemberList = new StaffMember();
StaffMemberList.init();
});
</script>