-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpage-caravan-insurance.php
437 lines (415 loc) · 17.3 KB
/
page-caravan-insurance.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
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
<?php
// Template name: caravan-insurance
?>
<!-- Include Header -->
<?php get_header(); ?>
<!-- Loop in the template -->
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<!-- Section Breadcrumbs -->
<?php breadcrumbs(); ?>
<!-- === FORM === -->
<?php echo do_shortcode('[merlin-dialler-form]'); ?>
<!-- === FAQ SCHEMA === -->
<?php
$faq_items = get_field('faq_items');
if ($faq_items) {
echo '<script type="application/ld+json">';
echo json_encode([
'@context' => 'https://schema.org',
'@type' => 'FAQPage',
'mainEntity' => array_map(function ($item) {
return [
'@type' => 'Question',
'name' => $item['question'],
'acceptedAnswer' => [
'@type' => 'Answer',
'text' => $item['answer'],
],
];
}, $faq_items),
]);
echo '</script>';
}
?>
<!-- === SECTION HERO === -->
<section class="s-hero-insurance">
<div class="container">
<div class="s-hero-insurance__left">
<div class="s-hero-insurance__left__title">
<span class="s-hero-insurance__span"><?php the_field('subtitle_left_caravan_insurance') ?></span>
<h1><?php the_field('title_left_caravan_insurance') ?></h1>
</div>
<div class="s-hero-insurance__left__list">
<ul>
<?php if( have_rows('list_left_caravan_insurance') ): while ( have_rows('list_left_caravan_insurance') ) : the_row(); ?>
<li>
<img src="<?php the_sub_field('icon_checked_caravan_insurance') ?>" alt="icon checked" title="icon checked" width="18" height="18">
<p><?php the_sub_field('text_caravan_insurance') ?></p>
</li>
<?php endwhile; else : endif;?>
</ul>
</div>
<div class="s-hero-insurance__numbers">
<span class="s-hero-insurance__span__text">Call Today for Our Best Price</span>
<ul>
<li class="mobile">
<img src="<?php echo get_template_directory_uri()?>/assets/icons/icon-mobile-blue.svg" alt="" width="40" height="40">
<a class="text__numbers" href="<?php the_field('link_text_mobile_phone_caravan_insurance') ?>">
<span>MOBILE FRIENDLY</span>
<p><?php the_field('mobile_phone_caravan_insurance') ?></p>
</a>
</li>
<li class="landline">
<img src="<?php echo get_template_directory_uri()?>/assets/icons/icon-phone-blue.svg" alt="" width="40" height="40">
<a class="text__numbers" href="<?php the_field('link_text_landline_phone_caravan_insurance') ?>">
<span>TELEPHONE</span>
<p><?php the_field('landline_phone_caravan_insurance') ?></p>
</a>
</li>
</ul>
<button class="btn btn-primary-lg cta-mobile js-open-modal ">
<img src="<?php echo get_template_directory_uri()?>/assets/icons/icon-email-white.svg" alt="icon email white" title="icon email white">
GET A QUOTE
</button>
</div>
</div>
<img src="<?php echo get_template_directory_uri()?>/assets/icons/line-section-hero.svg" alt="" class="line-middle">
<div class="s-hero-insurance__right">
<!-- Section TrustPilot -->
<div class="s-trustpilot-insurance-mobile">
<?php include(TEMPLATEPATH .'/includes/section-trustpilot-insurance.php') ?>
</div>
<!-- End Trustpilot -->
<div class="s-hero-insurance__right__title">
<span class="s-hero-insurance__span"><?php the_field('subtitle_right_caravan_insurance') ?></span>
<h2><?php the_field('title_right_caravan_insurance') ?></h2>
</div>
<div class="s-hero-insurance__right_content">
<img src="<?php echo get_template_directory_uri()?>/assets/icons/line-section-hero.webp" alt="" class="line-right-hero" width="30" height="160">
<div class="s-hero-insurance__right__list">
<ul>
<li>
<p><?php the_field('title_01_caravan_insurance') ?></p>
<span><?php the_field('subtitle_01_caravan_insurance') ?></span>
</li>
<li>
<p><?php the_field('title_02_caravan_insurance') ?></p>
<span><?php the_field('subtitle_02_caravan_insurance') ?></span>
</li>
<li>
<p><?php the_field('title_03_caravan_insurance') ?></p>
<span><?php the_field('subtitle_03_caravan_insurance') ?></span>
</li>
</ul>
</div>
</div>
<button class="btn btn-primary-lg js-open-modal">
<img src="<?php echo get_template_directory_uri()?>/assets/icons/icon-email-white.svg" alt="icon email white" title="icon email white">
GET A QUOTE
</button>
</div>
</div>
</section>
<!-- Section TrustPilot -->
<section class="s-trustpilot-insurance">
<div class="container">
<?php include(TEMPLATEPATH .'/includes/section-trustpilot-insurance.php') ?>
</div>
</section>
<!-- === SECTION ACCREDITATIONS === -->
<?php include(TEMPLATEPATH .'/includes/section-company-logos-insurance.php') ?>
<!-- Table of Contents -->
<section class="s-table-contents">
<div class="container">
<!-- Navbar Tab -->
<ul class="js-nav-product" id="js-nav-product">
<li class="js-item-content">
<a href="#overview" class="anchor">
<p>Overview</p>
</a>
</li>
<li class="js-item-content">
<a href="#cover" class="anchor">
<p>Cover Options</p>
</a>
</li>
<li class="js-item-content">
<a href="#why" class="anchor">
<p>Why Choose Us?</p>
</a>
</li>
<li class="js-item-content">
<a href="#faqs" class="anchor">
<p>FAQs</p>
</a>
</li>
</ul>
<!-- Mobile Configuration -->
<div class="custom-select-content">
<select id="dropdown-select-content" class="select-mobile-config">
<option value="">
<p>Select an item</p>
</option>
<option value="#overview">
<p>Overview</p>
</option>
<option value="#cover">
<p>Cover Options</p>
</option>
<option value="#why">
<p>Why Choose Us?</p>
</option>
<option value="#faqs">
<p>FAQs</p>
</option>
<!-- Add more options as needed -->
</select>
</div>
</div>
</section>
<!-- Section Content -->
<section class="s-content" id="overview">
<div class="container">
<!-- Content Tab -->
<div class="tab-product-content">
<div class="text-content active">
<?php the_content(); ?>
</div>
</div>
</div>
</section>
<!-- Section Featured Content -->
<section class="s-featured-content">
<div class="container">
<div class="s-featured-content__left">
<h4><?php the_field('title_featured_content_caravan_insurance') ?></h4>
<div class="s-featured-content__text">
<?php the_field('description_featured_content_caravan_insurance') ?>
</div>
</div>
<div class="s-featured-content__right">
<img src="<?php the_field('image_featured_content_caravan_insurance') ?>" alt="">
</div>
</div>
</section>
<!-- Section Featured Secondary Content -->
<section class="s-featured-secondary-content">
<div class="container">
<div class="s-featured-content__right">
<img src="<?php the_field('image_featured_content_secondary_caravan_insurance') ?>" alt="">
</div>
<div class="s-featured-content__left">
<h4><?php the_field('title_featured_content_secondary_caravan_insurance') ?></h4>
<div class="s-featured-content__text">
<?php the_field('description_featured_content_secondary_caravan_insurance') ?>
</div>
</div>
</div>
</section>
<!-- Section Column Content -->
<section class="s-column-content">
<div class="container">
<div class="s-column-content-card">
<div class="s-column-content-card-image">
<img src="<?php the_field('image_left_column_caravan_insurance') ?>" alt="">
</div>
<h4><?php the_field('title_left_column_caravan_insurance') ?></h4>
<div class="s-column-content-card-text">
<?php the_field('description_left_column_caravan_insurance') ?>
</div>
</div>
<div class="s-column-content-card">
<div class="s-column-content-card-image">
<img src="<?php the_field('image_right_column_caravan_insurance') ?>" alt="">
</div>
<h4><?php the_field('title_right_column_caravan_insurance') ?></h4>
<div class="s-column-content-card-text">
<?php the_field('description_right_column_caravan_insurance') ?>
</div>
</div>
</div>
</section>
<!-- Section COVER / DO NOT COVER -->
<section class="s-cover" id="cover">
<div class="container">
<h4><?php the_field('cover_title_caravan_insurance'); ?></h4>
<div class="cover-section">
<div class="cover-on">
<h6><?php the_field('mobile_title_section_cover_caravan_insurance'); ?></h6>
<ul>
<!-- Repeater Slide Cards -->
<?php if( have_rows('section_cover_on_caravan_insurance') ): while ( have_rows('section_cover_on_caravan_insurance') ) : the_row(); ?>
<li>
<img src="<?php the_sub_field('icon_checked_cover_on_caravan_insurance'); ?>" alt="icon checked" title="icon checked" width="18" height="18">
<p><?php the_sub_field('text_cover_on_caravan_insurance'); ?></p>
</li>
<?php endwhile; else : endif;?>
</ul>
</div>
<div class="cover-off">
<h6>What's not included:</h6>
<ul>
<!-- Repeater Slide Cards -->
<?php if( have_rows('section_cover_off_caravan_insurance') ): while ( have_rows('section_cover_off_caravan_insurance') ) : the_row(); ?>
<li>
<img src="<?php the_sub_field('icon_checked_cover_off_caravan_insurance'); ?>" alt="icon not checked" title="icon not checked" width="23" height="23">
<p><?php the_sub_field('text_cover_off_caravan_insurance'); ?></p>
</li>
<?php endwhile; else : endif;?>
</ul>
</div>
</div>
</div>
</section>
<!-- Section Product -->
<section class="s-slide-product">
<div class="container">
<div class="top">
<h6><?php the_field('mobile_title_section_product_slide_caravan_insurance') ?></h6>
<h4><?php the_field('title_section_product_slide_caravan_insurance') ?></h4>
<div class="ctrl-slide">
<!-- Swipper pagination structure -->
<div class="swiper-pagination"></div>
<div class="ctrl">
<button class="btn-prev">
<img src="<?php echo get_template_directory_uri()?>/assets/icons/arrow-slide.svg" alt="arrow prev" title="arrow prev">
</button>
<button class="btn-next">
<img src="<?php echo get_template_directory_uri()?>/assets/icons/arrow-slide.svg" alt="arrow next" title="arrow next">
</button>
</div>
</div>
</div>
<!-- Swiper slide structure -->
<div class="slide-product">
<div class="swiper-wrapper">
<!-- Repeater Slide Cards -->
<?php if( have_rows('card_product_slide_caravan_insurance') ): while ( have_rows('card_product_slide_caravan_insurance') ) : the_row(); ?>
<div class="swiper-slide">
<!-- Card Product Type -->
<a href="<?php the_sub_field('card_link_caravan_insurance') ?>" class="card-product">
<div class="image">
<img src="<?php the_sub_field('image_card_caravan_insurance') ?>" alt="card product page" title="card product page">
</div>
<div class="info">
<h6><?php the_sub_field('card_title_caravan_insurance') ?></h6>
<p><?php the_sub_field('subtitle_card_caravan_insurance') ?></p>
<div class="learn-more">
<span><?php the_sub_field('link_card_title_caravan_insurance') ?></span>
<img src="<?php echo get_template_directory_uri()?>/assets/icons/icon-arrowdown.svg" alt="arrow right rounded" title="arrow right rounded">
</div>
</div>
</a>
</div>
<?php endwhile; else : endif;?>
</div>
</div>
</div>
</section>
<!-- Section CTA Desktop -->
<div class="s-newsletter">
<div class="container">
<span class="large-cta js-open-modal">
<div class="text">
<span><?php the_field('subtitle_cta_caravan_insurance') ?></span>
<h3><?php the_field('title_cta_caravan_insurance') ?></h3>
</div>
<button class="btn btn-primary">
<img src="<?php echo get_template_directory_uri()?>/assets/icons/icon-arrow-forward.svg" alt="icon forward arrow white" title="icon forward arrow white" loading="lazy">
get a quote
</button>
</span>
</div>
</div>
<!-- Section Bespoke -->
<section class="s-bespoke" id="why">
<div class="container">
<div class="text-top">
<h6><?php the_field('mobile_title_section_why_us_caravan_insurance') ?></h6>
<h4><?php the_field('title_section_why_us_caravan_insurance') ?></h4>
<p><?php the_field('subtitle_section_why_us_caravan_insurance') ?></p>
</div>
<div class="main-bespoke">
<div class="text-bottom">
<ul>
<!-- Repeater Slide Cards -->
<?php if( have_rows('cards_section_why_us_caravan_insurance') ): while ( have_rows('cards_section_why_us_caravan_insurance') ) : the_row(); ?>
<!-- Card -->
<li>
<img src="<?php the_sub_field('icon_card_caravan_insurance'); ?>" alt="icon house" title="icon house">
<h5><?php the_sub_field('title_why_us_card_caravan_insurance'); ?></h5>
<p><?php the_sub_field('description_why_us_card_caravan_insurance'); ?></p>
</li>
<?php endwhile; else : endif;?>
</ul>
</div>
<img src="<?php the_field('image_section_why_us_caravan_insurance') ?>" alt="bespoke image" title="bespoke image" class="bespoke-img">
</div>
<p class="terms-conditions-why-us"><?php the_field('terms_conditions_why_us_caravan_insurance') ?></p>
</div>
</section>
<!-- Section FAQs -->
<section class="s-faqs padding-bottom" id="faqs">
<div class="container">
<h4><?php the_field('title_section_caravan_insurance') ?></h4>
<div class="b-container">
<!-- Repeater Slide Cards -->
<?php if( have_rows('section_faq_caravan_insurance') ): while ( have_rows('section_faq_caravan_insurance') ) : the_row(); ?>
<!-- Question Card -->
<div class="question">
<div class="title js-question">
<strong><?php the_sub_field('title_faq_caravan_insurance'); ?></strong>
<i class="fa-solid fa-chevron-down"></i>
</div>
<div class="question-content">
<?php the_sub_field('description_faq_caravan_insurance'); ?>
</div>
</div>
<?php endwhile; else : endif;?>
</div>
</div>
</section>
<!-- Section Banner CTA 02 -->
<section class="s-banner-cta">
<div class="container">
<img src="<?php the_field('image_01_banner_caravan_insurance') ?>" alt="" class="img-banner">
<img src="<?php the_field('image_02_banner_caravan_insurance') ?>" alt="" class="img-banner">
<div class="s-banner-cta-text">
<h2><?php the_field('title_banner_caravan_insurance') ?></h2>
<p><?php the_field('subtitle_banner_caravan_insurance') ?></p>
<!-- BUTTON LINKS TO THE FORM -->
<button class="btn btn-primary js-open-modal-insurance" aria-label="Get Quote Button">
<img src="<?php echo get_template_directory_uri()?>/assets/icons/icon-email-white.svg" alt="icon email white" title="icon email white" loading="lazy">
GET A QUOTE
</button>
</div>
</div>
</section>
<!-- Section Related Articles Filter By Tag -->
<?php
$tag = get_queried_object();
$args = array(
'post_type' => 'post',
'order' => 'DESC',
'posts_per_page' => 3,
'tag_id' => 23,
);
$the_query = new WP_Query($args);
?>
<?php if ($the_query->have_posts()) : ?>
<section class="s-articles" id="s-articles">
<div class="container">
<div class="text-top">
<h6><?php the_field('mobile_title_section_articles_caravan_insurance'); ?></h6>
<h4><?php the_field('title_section_articles_caravan_insurance'); ?></h4>
<p><?php the_field('description_section_articles_caravan_insurance'); ?></p>
</div>
<!-- Section Article Cards -->
<?php include(TEMPLATEPATH .'/includes/page-insurance-article-cards.php') ?>
</div>
</section>
<?php endif; ?>
<!-- End loop -->
<?php endwhile; else: endif; ?>
<!-- Include Footer -->
<?php get_footer(); ?>