-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle-campus.php
More file actions
99 lines (93 loc) · 3.04 KB
/
Copy pathsingle-campus.php
File metadata and controls
99 lines (93 loc) · 3.04 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
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package ROCKHARBOR_Church
*/
// Set Campus Slug as Campus Cookie
global $post;
// fix new -online campuses; costa-mesa-online becomes costa-mesa
$campus = preg_replace('/(.*)-online/', '$1', $post->post_name);
$_COOKIE['campus'] = $campus;
setcookie('campus', $campus, 2147483647, '/');
get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<section class="campus-hero" style="background-image: url('<?php echo the_post_thumbnail_url( 'large' );?>')">
<div class="container">
<div>
<h1><?php the_title();?></h1>
<?php
$weekend_fields = get_field('weekend_fields');
$kids_fields = get_field('kids_fields');
$youth_fields = get_field('youth_fields');
$social_fields = get_field('social_fields');
$custom_button = get_field('custom_button');
?>
<div class="info">
<div class="info-box">
<div class="info-header">
<span>Weekend Services</span>
</div>
<div class="info-body">
<span><?php echo $weekend_fields['description']; ?></span>
</div>
<div class="info-links">
<ul>
<li><a href="<?php echo $weekend_fields['live_link']; ?>">Watch Live</a></li>
<li><a href="<?php echo $weekend_fields['archive_link']; ?>">Past Messages</a></li>
</ul>
</div>
</div>
<div class="info-box">
<div class="info-header">
<span>Kids Services</span>
</div>
<div class="info-body">
<span><?php echo $kids_fields['description']; ?></span>
</div>
<div class="info-links">
<ul>
<li><a href="<?php echo $kids_fields['live_link']; ?>">Watch Live</a></li>
<li><a href="<?php echo $kids_fields['archive_link']; ?>">Past Messages</a></li>
</ul>
</div>
</div>
<div class="info-box">
<div class="info-header">
<span>Youth Services</span>
</div>
<div class="info-body">
<span><?php echo $youth_fields['description']; ?></span>
</div>
<div class="info-links">
<ul>
<li><a href="<?php echo $youth_fields['live_link']; ?>">Watch Live</a></li>
<li><a href="<?php echo $youth_fields['archive_link']; ?>">Past Messages</a></li>
</ul>
</div>
</div>
</div>
<div class="bottom-links">
<a href="<?php echo $social_fields['instagram']; ?>" title="Follow Us on Instagram"><i class="bx bxl-instagram"></i>Follow Us</a>
<a href="<?php echo $custom_button['link']; ?>" title="<?php echo $custom_button['text']; ?>"><?php echo $custom_button['text']; ?></a>
</div>
</div>
</div>
<nav class="campus-menu">
<?php
wp_nav_menu( array(
'theme_location' => 'campuses',
'menu_id' => '',
'menu_class' => '',
'container' => '',
'depth' => 1,
) );
?>
</nav>
</section>
<?php get_template_part( 'template-parts/content', 'modules' );?>
<?php endwhile; ?>
<?php
get_footer();