content-course.php
3.64 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
/**
* Partial template for content in page.php
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
$program_info = get_field('program_info');
?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<div class="entry-content">
<div class="row align-items-start">
<div class="col-lg-6 ">
<?php
the_content();
?>
</div>
<div class="col-lg-6 ">
<div class="program-info">
<ul class="nav nav-tabs" id="program-info" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#who" type="button" role="tab" aria-controls="who" aria-selected="true">Who is this for?</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#costs" type="button" role="tab" aria-controls="costs" aria-selected="false">Cost & Date(s)</button>
</li>
</ul>
<div class="tab-content" id="program-info-content">
<div class="tab-pane fade show active" id="who" role="tabpanel" aria-labelledby="who-tab" tabindex="0">
<?php echo $program_info['who_is_this_for']; ?>
</div>
<div class="tab-pane fade" id="costs" role="tabpanel" aria-labelledby="costs-tab" tabindex="0">
<?php if(is_array($program_info['cost_&_dates'])): ?>
<table>
<tr class="not"><th>Cost</th><th>Duration</th><th>Date</th></tr>
<tr><td>PUBLIC | STAFF</td><td></td><td></td></tr>
<?php foreach ( $program_info['cost_&_dates'] as $cost_dates){
echo "<tr><td>$".trim($cost_dates['cost'])." | $".trim($cost_dates['cost_staff'])."</td><td>".$cost_dates['duration']."</td><td>".$cost_dates['date']."</td></tr>";
};?>
</table>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
<?php if( have_rows('outcomes') ): ?>
<div class="outcomes">
<h2>Outcomes</h2>
<p>By the end of this workshop, participants will be able to:<p>
<div class="row">
<?php while( the_repeater_field('outcomes') ): ?>
<div class="col-out col-lg-3">
<?php if(get_sub_field('content') != ""){ ?>
<div class="outcome">
<?php the_sub_field('content'); ?>
</div>
<?php } ?>
</div>
<?php endwhile; ?>
</div>
</div>
<?php endif; ?>
<?php if( have_rows('testimonials_items') ): ?>
<div id="<?php echo esc_attr($id); ?>" class="carousel">
<div class="testimonials-carousel carousel-items <?php echo $size; ?>">
<div class='swiper-wrapper'>
<?php while( the_repeater_field('testimonials_items') ): ?>
<div class="swiper-slide">
<div id="<?php echo esc_attr($id); ?>" class=" testimonials">
<?php $image = get_sub_field('image'); ?>
<div class="row">
<div class="col-md-4 testimonial-image" style=background-image:url(<?php echo $image['url'];?>); ></div>
<div class="col-md-8">
<div class="testimonial-text"><p><?php the_sub_field('text'); ?></p></div>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
<div class="swiper-pagination"></div>
<div class="swiper-button-prev" data-id="<?= $id ?>"></div>
<div class="swiper-button-next" data-id="<?= $id ?>"></div>
</div>
</div>
<?php endif; ?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php understrap_edit_post_link(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->