This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-faq.php
79 lines (72 loc) · 2.9 KB
/
page-faq.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
<?php
/**
* Created by PhpStorm.
* User: mrx
* Date: 09.02.19
* Time: 22:16
*/
?>
<?php get_template_part('layout/header'); ?>
<section class="container-fluid page-title">
<img src="<?php echo get_template_directory_uri(); ?>/images/offer/background.jpg" class="page-title__background"
alt="">
<div class="row align-items-center h-100">
<div class="container">
<div class="row">
<div class="col-lg-12 page-title__header">
<h1>FAQ</h1>
<hr class="page-title__separator"/>
<p>
Odpowiedzi na najczęściej zadawane pytania
</p>
</div>
</div>
</div>
</div>
</section>
<section class="container faq">
<div class="row">
<div class="col-xl-12 py-5">
<div class="accordion" id="accordionExample">
<?php
$args = array(
'post_type' => 'comfy-faq',
'posts_per_page' => -1,
);
$query = new WP_Query($args);
?>
<?php if ($query->have_posts()) : ?>
<?php $counter = 0; ?>
<?php while ($query->have_posts()) : $query->the_post(); ?>
<div class="card">
<div class="card-header"
id="heading-<?php echo $counter; ?>"
data-toggle="collapse"
data-target="#collapse-<?php echo $counter; ?>"
aria-expanded="true"
aria-controls="collapseOne">
<div class="card-header__icon">
<i class="fas fa-plus"></i>
</div>
<div class="card-header__question">
<?php echo get_the_title(); ?>
</div>
</div>
<div id="collapse-<?php echo $counter; ?>"
class="collapse"
aria-labelledby="heading-<?php echo $counter; ?>"
data-parent="#accordionExample">
<div class="card-body">
<?php echo get_the_content(); ?>
</div>
</div>
</div>
<?php $counter++; ?>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
</div>
</section>
<script src="<?php echo get_template_directory_uri(); ?>/js/faq-accordions.js?v=<?php echo current_time('timestamp', 0); ?>"></script>
<?php get_template_part('layout/footer'); ?>