-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-home.php
executable file
·373 lines (303 loc) · 19.1 KB
/
page-home.php
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
<?php get_header(); ?>
<?php
$post_id = get_the_ID();
$hero_video_url = get_post_meta( $post_id, 'hero_video_url', true );
?>
<div class="page-wrapper">
<!-- Start video hero -->
<div class="video-hero jquery-background-video-wrapper demo-video-wrapper">
<video class="jquery-background-video" autoplay muted loop playsinline poster="">
<source src="<?php echo esc_url( $hero_video_url ) ?>" type="video/mp4">
</video>
<div class="video-overlay"></div>
<div class="page-width">
<!-- <div class="video-hero--content">-->
<!-- <h2>Background Video Demo</h2>-->
<!-- <p>Full width video hero</p>-->
<!-- </div>-->
</div>
</div>
<!-- End video hero -->
<div class="landing-locations">
<div class="containerx">
<div class="landing-locations-wrap">
<?php
// get all courses in this custom taxonomy
$activities = get_posts(
array(
'posts_per_page' => 5,
'post_type' => 'activities',
)
);
if( !empty($activities) && count($activities) > 0 ):
$class_index = 1;
foreach ($activities as $activity):
$activity_id = $activity->ID;
$activity_title = $activity->post_title;
$activity_thumbnail = get_the_post_thumbnail_url($activity_id, 'full');
$activity_permalink = get_the_permalink($activity_id);
?>
<div class="d-flex">
<a href="<?php echo $activity_permalink; ?>" data-name="<?php echo $activity_title; ?>" id="location_1" class="d-flex flex-column landing-location landing-location_<?php echo $class_index;?>">
<h2 class="d-flex justify-content-center align-items-center flex-1 landing-location__title"> <?php echo $activity_title; ?> </h2>
<div class="landing-location__img">
<img src="<?php echo esc_url($activity_thumbnail); ?>" alt="<?php echo $activity_title; ?>">
</div>
</a>
</div>
<?php
$class_index++;
endforeach;
endif;
?>
</div>
</div>
</div>
<section class="video-two" style="background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/assets/images/shapes/video-2-bg.png);">
<img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/images/shapes/swimmer-1-1.png" class="video-two__swimmer" alt="">
<div class="container">
<div class="video-two__box wow fadeInRight" data-wow-duration="1500ms" style="visibility: visible; animation-duration: 1500ms; animation-name: fadeInRight;">
<?php
$about_video_poster = get_post_meta($post_id, 'about_video_poster', true);
if( !empty( $about_video_poster ) ):
$about_video_poster_url = wp_get_attachment_image_src( $about_video_poster , 'full')[0];
endif;
?>
<img src="<?php echo $about_video_poster_url;?>" alt="">
<a target="_blank" href="<?php echo get_post_meta($post_id, 'about_video_url', true); ?>" class="video-popup html5lightbox"><i class="fa fa-play"></i></a>
<!-- /.video-popup -->
</div><!-- /.video-two__box -->
<div class="row">
<div class="col-xl-6">
<div class="video-two__content">
<div class="block-title">
<img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/images/shapes/sec-line-1.png" alt="">
<p class="text-uppercase"> <?php echo get_post_meta($post_id, 'about_sub_title', true);?> </p>
<h3 class="text-uppercase"><?php echo get_post_meta($post_id, 'about_title', true);?></h3>
</div><!-- /.block-title -->
<p>
<?php echo get_post_meta($post_id, 'about_description', true);?>
</p>
<a href="<?php echo home_url(); ?>/contact-us" class="thm-btn video-two__btn">Contact us</a>
<!-- /.thm-btn video-two__btn -->
</div><!-- /.video-two__content -->
</div><!-- /.col-lg-6 -->
</div><!-- /.row -->
</div><!-- /.container -->
</section>
<section class="course-one__title">
<div class="course-one__bg" style="background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/assets/images/shapes/water-wave-bg.png);"></div>
<!-- /.course-one__bg -->
<div class="container ">
<div class="block-title text-left">
<img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/images/shapes/sec-line-1.png" alt="">
<p class="text-uppercase"> <?php echo get_post_meta($post_id, 'courses_sub_title', true); ?> </p>
<h3 class="text-uppercase"> <?php echo get_post_meta($post_id, 'courses_title', true); ?> </h3>
</div><!-- /.block-title -->
<div class="text-block">
<p class="m-0">
<?php echo get_post_meta($post_id, 'courses_description', true); ?>
</p>
</div><!-- /.text-block -->
</div><!-- /.container -->
</section>
<div class="course-one course-one__carousel-wrapper">
<!-- footer fishes -->
<img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/images/shapes/fish-1-1.png" alt="" class="site-footer__fish-1">
<!-- footer trees -->
<img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/images/shapes/tree-1-1.png" class="site-footer__tree-1" alt="">
<div class="container">
<div class="owl-carousel home-courses">
<?php
// get all courses in this custom taxonomy
$courses = get_posts(
array(
'posts_per_page' => 9,
'post_type' => 'courses',
)
);
if( !empty($courses) && count($courses) > 0 ):
foreach ($courses as $course):
$course_id = $course->ID;
$course_title = $course->post_title;
$course_duration = get_post_meta($course_id, 'course_duration', true);
$course_equipment = get_post_meta($course_id, 'course_equipment', true);
$course_overview = get_post_meta($course_id, 'course_overview', true);
$course_thumbnail = get_the_post_thumbnail_url($course_id, 'full');
$course_permalink = get_the_permalink($course_id);
$course_category = get_the_terms( $course_id, 'courses_categories' )[0]->name;
?>
<div class="item">
<div class="course-one__single">
<div class="course-one__image">
<a href="<?php echo $course_permalink; ?>" class="course-one__cat"> <?php echo $course_category; ?> </a>
<div class="course-one__image-inner">
<img src="<?php echo $course_thumbnail; ?>" alt="">
<a href="<?php echo $course_permalink; ?>"> <i class="fas fa-plus"></i> </a>
</div><!-- /.course-one__image-inner -->
</div><!-- /.course-one__image -->
<div class="course-one__content hvr-sweep-to-bottom">
<h3><a href="<?php echo $course_permalink; ?>"> <?php echo $course_title; ?> </a></h3>
<p class="course-overview">
<?php echo $course_overview; ?>
</p>
</div><!-- /.course-one__content -->
<a href="<?php echo $course_permalink; ?>" class="course-one__book-link">Book this course</a>
</div><!-- /.course-one__single -->
</div>
<?php
endforeach;
endif;
?>
</div>
</div>
</div>
<section class="testimonials-one__title testimonials-one__title__home-one">
<div class="testimonials-one__bg" style="background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/assets/images/shapes/water-wave-bg.png);"></div>
<!-- /.testimonials-one__bg -->
<div class="container">
<div class="block-title text-center">
<img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/images/shapes/sec-line-1.png" alt="">
<p class="text-uppercase"> <?php echo get_post_meta($post_id, 'testimonials_sub_title', true); ?> </p>
<h3 class="text-uppercase"> <?php echo get_post_meta($post_id, 'testimonials_title', true); ?> </h3>
</div><!-- /.block-title -->
</div><!-- /.container -->
</section>
<section class="testimonials-one__carousel-wrapper testimonials-one__carousel-wrapper__home-one">
<div class="container wow fadeIn" data-wow-duration="2000ms" style="visibility: visible; animation-duration: 2000ms; animation-name: fadeIn;">
<div class="testimonials-carousal testimonials-one__carousel owl-carousel owl-theme thm__owl-carousel thm__owl-dot-2 owl-loaded owl-drag" data-options="{"items": 3, "margin": 30, "loop": true, "autoplay": true, "autoplayTimeout": 5000, "autoplayHoverPause": true, "smartSpeed": 700, "responsive": {"0": {"items": 1, "dots": false, "nav": true}, "480": {"items": 1, "dots": false, "nav": true}, "767": {"items": 1, "dots": false, "nav": true}, "991": {"items": 2}, "1199": {"items": 3, "margin": 30}}}">
<?php
// get all courses in this custom taxonomy
$testimonials = get_posts(
array(
'posts_per_page' => 9,
'post_type' => 'testimonials',
)
);
if( !empty($testimonials) && count($testimonials) > 0 ):
foreach ($testimonials as $testimonial):
$testimonials_id = $testimonial->ID;
$testimonials_title = $testimonial->post_title;
$testimonials_content = $testimonial->post_content;
?>
<div class="item">
<div class="testimonials-one__single">
<div class="testimonials-one__content">
<div class="testimonials-one__content-inner">
<div class="testimonials-one__qoute"></div><!-- /.testimonials-one__qoute -->
<p> <?php echo $testimonials_content; ?> </p>
<div class="testimonials-one__infos">
<div class="testimonials-one__image">
<div class="testimonials-one__image-inner">
<img src="<?php echo get_the_post_thumbnail_url($testimonials_id, 'thumbnail');?>" alt="">
</div><!-- /.testimonials-one__image-inner -->
</div><!-- /.testimonials-one__image -->
<div class="testimonials-one__infos-content">
<h3> <?php echo $testimonials_title; ?> </h3>
</div><!-- /.testimonials-one__infos-content -->
</div><!-- /.testimonials-one__infos -->
</div><!-- /.testimonials-one__content-inner -->
</div><!-- /.testimonials-one__content -->
</div><!-- /.testimonials-one__single -->
</div>
<?php
endforeach;
endif;
?>
</div><!-- /.testimonials-one__carousel owl-carousel owl-theme thm__owl-carousel -->
</div><!-- /.container -->
</section>
<section class="blue-bg padding-xl image-background center-info">
<div class="container">
<div class="row">
<div class="col-md-6">
<div>
<div class="block-title text-center">
<h3 class="white-color"> <?php echo !empty( get_post_meta($post_id, 'the_center_title', true) ) ? get_post_meta($post_id, 'the_center_title', true) : ''; ?> </h3>
</div>
<p class="white-text text-nm text-light margin-lg">
<?php echo !empty( get_post_meta($post_id, 'the_center_desc', true) ) ? get_post_meta($post_id, 'the_center_desc', true) : ''; ?>
</p>
<a href="<?php echo !empty( get_post_meta($post_id, 'center_button_one_link', true) ) ? get_post_meta($post_id, 'center_button_one_link', true) : ''; ?>" class="btn-reset btn-sm orange-bg padding-lg-h rounded-nm text-nm white-text letter-spacing-sm prices-btn"><i class="fa fa-dollar"></i>
<?php echo !empty( get_post_meta($post_id, 'center_button_one_text', true) ) ? get_post_meta($post_id, 'center_button_one_text', true) : ''; ?>
</a>
<a href="<?php echo !empty( get_post_meta($post_id, 'center_button_two_link', true) ) ? get_post_meta($post_id, 'center_button_two_link', true) : ''; ?>" class="btn-reset btn-sm padding-lg-h rounded-nm text-nm white-text letter-spacing-sm get-locations-btn"><i class="fa fa-map-marker"></i>
<?php echo !empty( get_post_meta($post_id, 'center_button_two_text', true) ) ? get_post_meta($post_id, 'center_button_two_text', true) : ''; ?>
</a>
</div>
</div>
<div class="col-md-6 the-center-home owl-theme owl-carousel">
<?php
$the_center_gallery = get_post_meta($post_id, 'the_center_gallery', true);
$the_center_gallery_items = explode(",", $the_center_gallery);
unset($the_center_gallery_items[0]);
if( !empty($the_center_gallery_items) && count($the_center_gallery_items) > 0 ):
foreach ($the_center_gallery_items as $the_center_gallery_item):
?>
<img src="<?php echo esc_url( wp_get_attachment_url( $the_center_gallery_item ) );?>" alt="">
<?php
endforeach;
endif;
?>
</div>
</div>
</div>
</section>
<section class="orange-bg padding-xl widgets">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="news">
<div class="block-title">
<h3 class="white-color"> News </h3>
</div>
<div class="one-item-dots owl-carousel home-blog">
<?php
// get all posts in this custom taxonomy
$posts = get_posts(
array(
'posts_per_page' => 9,
'post_type' => 'post',
'post_status' => 'publish'
)
);
if( !empty($posts) && count($posts) > 0 ):
foreach ($posts as $post):
$postID = $post->ID;
$post_content = $post->post_content;
$post_title = $post->post_title;
$post_thumbnail = get_the_post_thumbnail_url($postID, 'full');
$post_permalink = get_the_permalink($postID);
$post_date = date("Y-m-d", strtotime($post->post_date));
?>
<div class="row">
<div class="col-sm-4 blog-image">
<div class="news-thumb">
<img src="<?php echo esc_url($post_thumbnail);?>" alt="<?php echo $post_title; ?>" class="rounded-nm">
</div>
</div>
<div class="col-sm-8 blog-content">
<div class="news-content white-bg rounded-nm">
<a href="#" class="text-nm blue-text text-medium block-item"> <?php echo $post_title; ?> </a>
<span class="grey-text text-sm text-normal margin-sm block-item"><i class="fa fa-calendar"></i> <?php echo $post_date; ?> </span>
<p class="grey-text text-sm text-light">
<?php echo $post_content;?>
</p>
<a href="<?php echo esc_url($post_permalink);?>" class="btn-reset blue-bg rounded-nm text-nm white-text letter-spacing-sm">
Read More
</a>
</div>
</div>
</div>
<?php
endforeach;
endif;
?>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<?php get_footer(); ?>