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
/
Copy pathteilnehmen.php
70 lines (62 loc) · 2.2 KB
/
teilnehmen.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
<?php /* Template Name: Teilnehmen */ ?>
<?php is_rest()?:get_header(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) :
the_post(); ?>
<div class="container mod-teilnehmen">
<div class="header">
<div class="infos">
<h1 class="post-title"><?php the_title(); ?></h1>
<p><?php the_field('text_intro'); ?></p>
</div>
<div class="illustration">
<?php
if ( has_post_thumbnail() ) {
the_aid_picture_tag(get_post_thumbnail_id(), 'large' );
}
?>
</div>
</div>
<div class="choice-container">
<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">
<?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 content" aria-labelledby="<?php echo $id_head; ?>">
<p>
<?php the_sub_field( 'antwort' ); ?>
<p>
</div>
</div>
<?php
$count ++;
endwhile;
?>
</div>
<?php
else :
// no rows found
endif;
?>
</div>
</div>
</div>
</div>
<?php endwhile; endif; ?>
<?php is_rest()?:get_footer(); ?>