-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage-the-stowe-center.php
More file actions
105 lines (95 loc) · 5.13 KB
/
page-the-stowe-center.php
File metadata and controls
105 lines (95 loc) · 5.13 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
102
103
104
105
<?php
/* Template Name: The Stowe Center */
get_header(); ?>
<div class="site-content">
<?php while ( have_posts() ) : the_post(); ?>
<section class="preface section <?php the_field('preface_background_color'); ?>">
<div class="section__content u-container">
<header class="section__header">
<h1 class="section-title"><?php the_title(); ?></h1>
</header>
<div class="section__body">
<?php the_content(); ?>
</div>
</div>
</section>
<section class="module module--entry <?php echo ( get_the_post_thumbnail_url() ) ? 'has-image' : '' ; ?>">
<?php if( get_the_post_thumbnail_url() ) : ?>
<div class="module__image" <?php echo "style='background-image: url(" . get_the_post_thumbnail_url() . "')"; ?>></div>
<?php endif; ?>
<div class="module__content u-container">
<header class="module__header">
<div class="module-title">
Hours
</div>
</header>
<aside class="module__sidebar">
<?php if( get_option('hbsc_holiday_open') || get_option('hbsc_holiday_closed') ) : ?>
<div class="sidebar">
<?php if( get_option('hbsc_holiday_open') ) : ?>
<p class="u-caps"><b>Open</b></p>
<p><?php echo get_option('hbsc_holiday_open'); ?></p>
<?php endif; ?>
<?php if( get_option('hbsc_holiday_closed') ) : ?>
<p class="u-caps"><b>Closed</b></p>
<p><?php echo get_option('hbsc_holiday_closed'); ?></p>
<?php endif; ?>
</div>
<?php endif; ?>
</aside>
<div class="module__body">
<?php
$today = get_option('hbsc_hours_'.strtolower(date('l')));
if( get_option('hbsc_closed_today') || empty($today) ) : ?>
<h5>Closed Today</h5>
<?php else : ?>
<h5>Open Today</h5>
<div class="u-font-miller-italic u-font-size-xl">
<?php hbsc_opening_hours_today(); ?>
</div>
<?php endif; ?>
<p><?php echo get_option( 'hbsc_hours_desc' ); ?></p>
<table>
<tbody>
<tr>
<td class="u-caps">Sunday</td>
<td><?php echo ( !empty(get_option('hbsc_hours_sunday')) ) ? get_option('hbsc_hours_sunday') : 'CLOSED'; ?></td>
</tr>
<tr>
<td class="u-caps">Monday</td>
<td><?php echo ( !empty(get_option('hbsc_hours_monday')) ) ? get_option('hbsc_hours_monday') : 'CLOSED'; ?></td>
</tr>
<tr>
<td class="u-caps">Tuesday</td>
<td><?php echo ( !empty(get_option('hbsc_hours_tuesday')) ) ? get_option('hbsc_hours_tuesday') : 'CLOSED'; ?></td>
</tr>
<tr>
<td class="u-caps">Wednesday</td>
<td><?php echo ( !empty(get_option('hbsc_hours_wednesday')) ) ? get_option('hbsc_hours_wednesday') : 'CLOSED'; ?></td>
</tr>
<tr>
<td class="u-caps">Thursday</td>
<td><?php echo ( !empty(get_option('hbsc_hours_thursday')) ) ? get_option('hbsc_hours_thursday') : 'CLOSED'; ?></td>
</tr>
<tr>
<td class="u-caps">Friday</td>
<td><?php echo ( !empty(get_option('hbsc_hours_friday')) ) ? get_option('hbsc_hours_friday') : 'CLOSED'; ?></td>
</tr>
<tr>
<td class="u-caps">Saturday</td>
<td><?php echo ( !empty(get_option('hbsc_hours_saturday')) ) ? get_option('hbsc_hours_saturday') : 'CLOSED'; ?></td>
</tr>
</tbody>
</table>
</div>
</div>
</section>
<?php
endwhile;
wp_reset_postdata();
?>
<?php if( have_rows('module') ): ?>
<?php get_template_part( 'partials/page', 'modules' ); ?>
<?php endif; ?>
</div>
<?php get_footer(); ?>