This repository has been archived by the owner on Jan 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
organigram.php
52 lines (49 loc) · 2.02 KB
/
organigram.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
<?php /* Template Name: Organigram */ ?>
<?php is_rest()?:get_header(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) :
the_post(); ?>
<div class="container mod-organigram">
<div class="header">
<div class="infos">
<h1 class="post-title"><?php the_title(); ?></h1>
<div class="text-intro"><?php the_field( 'text_intro' ); ?></div>
</div>
</div>
<div class="org-container">
<?php
if ( have_rows( 'org_row' ) ):
while ( have_rows( 'org_row' ) ) : the_row(); ?>
<h2><?php the_sub_field( 'team' ); ?></h2>
<div class="contact-row">
<?php
if ( have_rows( 'person' ) ):
while ( have_rows( 'person' ) ) : the_row();
$org_img = get_sub_field( 'image' ); ?>
<div class="contact">
<div class="img-container">
<img src="<?php echo $org_img['sizes']['large']; ?>" alt="<?php _e($org_img['alt']);?>">
</div>
<div class="info-container">
<p class="org-job"><?php the_sub_field( 'job' ); ?></p>
<p class="org-name"> <?php the_sub_field( 'name' ); ?></p>
<?php if ( get_sub_field( 'contact' ) ): ?>
<p class="org-contact">
<a href="mailto:<?php the_sub_field( 'contact' ); ?>">
<?php the_sub_field( 'contact' ); ?>
</a>
</p>
<?php endif; ?>
<?php if ( $link = get_sub_field( 'person_link' ) ): ?>
<p class="org-link">
<a href="<?php echo $link['url']; ?>" target="<?php echo $link['target']; ?>"><?php echo $link['title'];; ?></a>
</p>
<?php endif; ?>
</div>
</div>
<?php endwhile; else : endif; ?>
</div>
<?php endwhile; else : endif; ?>
</div>
</div>
<?php endwhile; endif; ?>
<?php is_rest()?:get_footer(); ?>