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
/
international.php
69 lines (64 loc) · 2.41 KB
/
international.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
<?php /* Template Name: International */ ?>
<?php is_rest()?:get_header(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) :
the_post(); ?>
<div class="container mod-international">
<div class="header">
<?php if( have_rows('header') ): ?>
<?php while( have_rows('header') ): the_row();
$headerImage = get_sub_field('intro_img');
?>
<div class="text">
<h1 class="post-title"><?php the_title(); ?></h1>
<p><?php the_sub_field( 'intro_text' ); ?></p>
</div>
<img src="<?php echo esc_url( $headerImage['url'] ); ?>">
<?php endwhile; ?>
<?php endif; ?>
</div>
<div class="good-to-know">
<?php if( have_rows('good_to_know') ): ?>
<?php while( have_rows('good_to_know') ): the_row(); ?>
<div class="gtn-container">
<h2 class="gtn-title"><?php the_sub_field('gtk_title'); ?></h2>
<?php if( have_rows('gtk_info_bloc') ): ?>
<?php while( have_rows('gtk_info_bloc') ): the_row();
$icon = get_sub_field('icon'); ?>
<div class="gtn-bloc">
<img src="<?php echo esc_url( $icon['url'] ); ?>">
<h3><?php the_sub_field( 'title' ); ?></h3>
<p><?php the_sub_field( 'text' ); ?></p>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
<div class="bloc-textImg">
<?php if( have_rows('txt_img_bloc') ): ?>
<?php while( have_rows('txt_img_bloc') ): the_row();
$image = get_sub_field('img');
?>
<img src="<?php echo esc_url( $image['url'] ); ?>">
<div class="text">
<h2><?php the_sub_field( 'title' ); ?></h2>
<p><?php the_sub_field( 'txt' ); ?></p>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
<div class="bloc-txt">
<?php if( have_rows('txt_bloc') ): ?>
<?php while( have_rows('txt_bloc') ): the_row(); ?>
<h2><?php the_sub_field( 'title' ); ?></h2>
<p><?php the_sub_field( 'txt' ); ?></p>
<button>
<!-- Buttons are missing. They need to appear only if they exist-->
</button>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
<?php endwhile; endif; ?>
<?php is_rest()?:get_footer(); ?>