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
/
uns-helfen.php
84 lines (73 loc) · 2.67 KB
/
uns-helfen.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
<?php /* Template Name: Uns helfen */ ?>
<?php is_rest()?:get_header(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="container mod-helfen">
<div class="header">
<div class="infos">
<h1 class="post-title"><?php the_title(); ?></h1>
<p class="text-intro"><?php the_field('text_intro'); ?></p>
</div>
<div class="illustration">
<img src="" alt="">
</div>
</div>
<?php $text_bloc = get_field('text_bloc'); ?>
<?php if($text_bloc['group_title']): ?>
<div class="crew-info">
<h2><?php echo $text_bloc['group_title']; ?></h2>
<?php echo $text_bloc['group_text']; ?>
</div>
<?php endif; ?>
<div class="row">
<?php
global $collaps_id;
$collaps_id ++;
$id = 'collapse-block-' . $collaps_id;
?>
<div id="<?php echo esc_attr( $id ); ?>" class="mod-collapse-big">
<h2><?php the_sub_field( 'ueberschrift' ); ?></h2>
<?php if ( have_rows( 'fragen' ) ): ?>
<div class="accordion" id="<?php echo $id; ?>-item">
<?php
$count = 1;
while ( have_rows( 'fragen' ) ) : the_row();
$id_head = esc_attr( $id . '-item-head-' . $count );
$id_content = esc_attr( $id . '-item-content-' . $count );
?>
<div class="collapse-item">
<div class="collapse-title" id="<?php echo $id_head; ?>">
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#<?php echo $id_content; ?>" aria-expanded="true" aria-controls="collapseOne">
<?php the_sub_field( 'frage' ); ?>
</button>
</div>
<div id="<?php echo $id_content; ?>" class="collapse" aria-labelledby="<?php echo $id_head; ?>">
<div class="card-body">
<?php the_sub_field( 'antwort' ); ?>
</div>
</div>
</div>
<?php
$count ++;
endwhile;
?>
</div>
<?php
else :
// no rows found
endif;
?>
</div>
</div>
<?php $helper_bloc = get_field('inscription_bloc'); ?>
<?php if($helper_bloc['text']): ?>
<div class="helper-bloc">
<h2><?php echo $helper_bloc['title']; ?></h2>
<div class="row">
<p><?php echo $helper_bloc['text']; ?></p>
<button class="btn-black"><?php echo $helper_bloc['button']; ?></button>
</div>
</div>
<?php endif; ?>
</div>
<?php endwhile; endif; ?>
<?php is_rest()?:get_footer(); ?>