-
Notifications
You must be signed in to change notification settings - Fork 4
/
homepage-campaigns-panels.php
50 lines (36 loc) · 1.16 KB
/
homepage-campaigns-panels.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
<section id="head" >
<div class="shell">
<div class="pagination">
<a href="#" class="swiper-next"></a>
<a href="#" class="swiper-prev"></a>
</div>
<div class="swiper-container">
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/_theme_styles/idangerous.swiper.css">
<div class="swiper-wrapper"><?php
$featured = new ATCF_Campaign_Query( array(
'posts_per_page' => -1,
'meta_query' => array(
array(
'key' => '_campaign_featured',
'value' => 1,
'compare' => '=',
'type' => 'numeric'
)
)
));
$category_postcount = $featured->post_count;
if ($category_postcount):
while ( $featured->have_posts() ) : $featured->the_post();
echo '<div class="swiper-slide">';
$campaign = new ATCF_Campaign( $post->ID );
get_template_part( 'content', 'campaign' );
echo '</div>';
endwhile;
endif;
wp_reset_query();
?></div>
</div>
<script src="<?php echo get_template_directory_uri(); ?>/js/idangerous.swiper-2.1.min.js"></script>
</div>
</div>
</section>