-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhome.php
More file actions
151 lines (123 loc) · 4.46 KB
/
home.php
File metadata and controls
151 lines (123 loc) · 4.46 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?php
/*
Template Name: Home
*/
?>
<?php get_header(); ?>
<?php include get_template_directory() . '/_/inc/modules/featured-slider.php'; ?>
<section id="about" class="about-section row">
<div class="section-content col-xs-12 col-md-10 col-md-offset-1">
<div class="about-text">
<h2 class="section-heading">About</h2>
<?php
$aboutContent = get_field('snowboy_about_text');
echo $aboutContent; ?>
</div><!-- .about-text -->
</div><!-- .section-content -->
</section><!-- .about-section -->
<section id="services" class="services-section row">
<div class="section-content col-xs-12">
<div class="services-text col xs-12 col-md-10 col-md-offset-1">
<h2 class="section-heading">Services</h2>
<?php
$servicesText = get_field('snowboy_services_text');
echo $servicesText; ?>
</div><!-- .services-text -->
<div class="services-list col xs-12">
<?php if (have_rows('snowboy_services_list')) :
while (have_rows('snowboy_services_list')) : the_row(); ?>
<ul class="services-list-left col-xs-12 col-sm-4">
<li><?php the_sub_field('snowboy_services_list_left'); ?></li>
</ul>
<ul class="services-list-left col-xs-12 col-sm-4">
<li><?php the_sub_field('snowboy_services_list_center'); ?></li>
</ul>
<ul class="services-list-center col-xs-12 col-sm-4">
<li><?php the_sub_field('snowboy_services_list_right'); ?></li>
</ul>
<?php endwhile; endif; ?>
</div><!-- .services-list -->
</div><!-- .section-content -->
</section><!-- .services-section -->
<section id="gallery" class="galleries-section row">
<div class="section-content col-xs-12">
<h2 class="section-heading">Event Galleries</h2>
<ul class="row">
<?php
$args = array(
'post_type' => 'snowboy_galleries',
'posts_per_page' => '3',
'order' => 'ASC'
);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
$pageSlug = $post->post_name;
switch ($pageSlug) {
case 'urban':
$postCat = "urban";
$galleryUrl = "/galleries/urban/";
break;
case 'resort':
$postCat = "resort";
$galleryUrl = "/galleries/resort/";
break;
case 'skate':
$postCat = "skate";
$galleryUrl = "/galleries/skate/";
break;
}
?>
<li class="col-xs-12 col-ms-4 col-sm-4">
<a href="<?php echo $galleryUrl; ?>" class="gallery-link">
<?php the_post_thumbnail('rect-medium'); ?>
<h4><?php echo $postCat; ?></h4>
</a>
</li>
<?php
endwhile; wp_reset_query();
?>
</ul>
</div><!-- .section-content -->
</section><!-- .home-galleries -->
<?php include get_template_directory() . '/_/inc/modules/social.php'; ?>
<section class="shop-section row">
<div class="section-content col-xs-12">
<h2 class="section-heading">Shop</h2>
<?php
$shopLinkImageLeft = get_field('snowboy_shop_image_left');
$shopLinkImageCenter = get_field('snowboy_shop_image_center');
$shopLinkImageRight = get_field('snowboy_shop_image_right');
?>
<ul class="shop-link-image-list row">
<li class="col-xs-12 col-ms-4 col-sm-4">
<a href="/shop/" class="shop-section-link">
<img src="<?php echo $shopLinkImageLeft['url']; ?>" />
</a>
</li>
<li class="col-xs-12 col-ms-4 col-sm-4">
<a href="/shop/" class="shop-section-link">
<img src="<?php echo $shopLinkImageCenter['url']; ?>" />
</a>
</li>
<li class="col-xs-12 col-ms-4 col-sm-4">
<a href="/shop/" class="shop-section-link">
<img src="<?php echo $shopLinkImageRight['url']; ?>" />
</a>
</li>
</ul>
</div>
</section>
<section id="clients" class="clients-section row">
<div class="section-content col-xs-12">
<h2 class="section-heading">Client List</h2>
<?php if (have_rows('snowboy_clients')) : ?>
<ul>
<?php while (have_rows('snowboy_clients')) : the_row(); ?>
<li><a href="<?php echo the_sub_field('snowboy_client_url'); ?>" target="_blank"><?php echo the_sub_field('snowboy_client_name'); ?></a></li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
<div class="clearfix"></div>
</div><!-- .section-content -->
</section><!-- .home-clients -->
<?php get_footer(); ?>