-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage-salons-at-stowe.php
More file actions
82 lines (71 loc) · 2.39 KB
/
page-salons-at-stowe.php
File metadata and controls
82 lines (71 loc) · 2.39 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
<?php
/* Template Name: Salons at Stowe */
$postId = null;
get_header();
$eventStartDate = null;
?>
<div class="site-content">
<?php
while ( have_posts() ) :
the_post();
if( null !== $post->ID && null === $postId )
{
$postId = $post->ID;
}
if( null !== get_field('event_start_date') && null === $eventStartDate )
{
$eventStartDate = get_field('event_start_date');
}
?>
<section class="preface section <?php the_field('preface_background_color'); ?>">
<div class="section__content u-container">
<header class="section__header">
<h1 class="section-title">Salons at Stowe</h1>
</header>
<div class="section__body">
<div class="preface-text">
<?php the_content(); ?>
</div>
</div>
</div>
</section>
<?php
endwhile;
wp_reset_postdata();
?>
<?php if( have_rows('module') ): ?>
<?php get_template_part( 'partials/page', 'modules' ); ?>
<?php endif; ?>
<!-- Upcoming section -->
<?php
// UPCOMING SALONS
$upcomingEventsSectionConfig = array(
'classes' => 'module--events-upcoming-list u-bg-light-gray',
'direction' => 'list',
'start_date' => date('Y-m-d') . ' 00:00:00'
);
include HBSC_PATH . 'partials/events/upcoming-section.php';
?>
<!-- Shows section -->
<?php
// PAST SALONS
$pastSalonsSectionConfig = array(
'classes' => 'module--past-salons u-bg-white',
'title' => 'PAST SALONS',
'display_button' => false
);
include HBSC_PATH . 'partials/events/past-salons-section.php';
?>
</div>
<?php get_footer(); ?>
<script>
var sortByPastEvents;
var sortByOptions = {
'defaultSortByKey' : 'recent',
'sortByKeys' : ['recent', 'most_viewed', 'most_discussed'],
};
jQuery( document ).ready(function()
{
sortByPastEvents = new SortBy( sortByOptions );
});
</script>