-
Notifications
You must be signed in to change notification settings - Fork 3
/
page-faq.php
74 lines (64 loc) · 2.54 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
<?php
/**
* The template for displaying faq pages.
*
* @package WordPress Sverige
*/
/*
Template Name: Vanliga frågor
*/
get_header();
while ( have_posts() ) : the_post(); ?>
<!-- Start Page Header -->
<section id="page-header" class="section">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1 class="page-title"><?php the_title(); ?></h1>
</div>
</div>
</div>
</section>
<!-- Start Page Header -->
<!-- Start Page Content -->
<section id="page-full" class="section">
<div class="container">
<div class="row">
<div class="col-md-9 page-content">
<?php if ( function_exists( 'sharing_display' ) ) remove_filter( 'the_content', 'sharing_display', 19 );
the_content(); ?>
<div class="panel-group faq-page" id="accordion" role="tablist" aria-multiselectable="true">
<?php $faq_posts = get_post_meta( get_the_ID(), '_faq_group_faq', true );
foreach((array)$faq_posts as $faq_post ){ ?>
<div class="panel panel-primary <?php echo ($c++%2==1) ? 'odd' : 'even' ?>">
<div class="panel-heading" role="tab" id="heading-faq-<?php echo $faq_post['permalink']; ?>">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#faq-<?php echo $faq_post['permalink']; ?>" aria-expanded="false" aria-controls="collapse-faq-<?php echo $faq_post['permalink']; ?>">
<i class="fa fa-question-circle"></i> <?php echo $faq_post['question']; ?>
</a>
<a href="#faq-<?php echo $faq_post['permalink']; ?>" class="share-faq" title="Dela den här frågan och svaret"><i class="fa fa-share-alt"></i></a>
</h4>
</div>
<div id="faq-<?php echo $faq_post['permalink']; ?>" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-faq-<?php echo $faq_post['permalink']; ?>">
<div class="panel-body">
<?php echo wpautop($faq_post['answer']); ?>
</div>
</div>
</div>
<?php } ?>
</div>
<?php echo sharing_display(); ?>
<?php wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Sidor:', 'wpsvse' ),
'after' => '</div>',
) );
edit_post_link( 'Redigera', '<span class="edit-link">', '</span>' );
?>
</div>
<?php get_sidebar(); ?>
</div>
</div>
</section>
<!-- End Page Content -->
<?php endwhile; // end of the loop. ?>
<?php get_footer(); ?>