-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate-survey.php
60 lines (51 loc) · 1.24 KB
/
template-survey.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
<?php
/**
* Template name: Ankety
*
* @package ceskaecommerce
*/
if ( empty( $pageID ) ) {
$pageID = PAGE_POLLS_ID;
}
?>
<section class="alert hide" id="poll-alert">
<div class="row-main">
<div class="alert__inner"></div>
</div>
</section>
<section class="section" role="region" id="ankety">
<div class="row-main">
<h2><?php echo get_the_title( $pageID ); ?></h2>
<?php
$args = array(
'posts_per_page' => 20,
'post_type' => 'sk_surveys',
'orderby' => 'menu_order',
'order' => 'ASC',
'no_found_rows' => true,
'suppress_filters' => false,
'ignore_sticky_posts' => true,
'post_status' => 'publish'
);
$surveys = new WP_Query( $args );
if ( $surveys->have_posts() ) :
?>
<ul class="grid grid--wider">
<?php
foreach ( $surveys->posts as $post ) :
$poll_id = $post->ID;
include( locate_template( 'inc/sk-polls-template.php' ) );
endforeach;
?>
</ul>
<?php
endif;
wp_reset_postdata();
// TESTIMONIALS
$testimonial_class = '';
$testimonial_content_class = '';
$include = false;
include( locate_template( 'components/testimonials.php', false, false ) );
?>
</div>
</section>