-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathevent-overview.php
60 lines (50 loc) · 1.48 KB
/
event-overview.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: Event Übersicht
*/
get_header();
?>
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/header-alpaka', get_post_type() );
endwhile; ?>
<section class="c-events-list">
<?php
$args = array('post_type' => 'page',
'post_parent' => get_the_ID(),
'posts_per_page' => -1,
'meta_key' => 'is_active',
'meta_value' => 1);
$the_query = new WP_Query( $args ); ?>
<?php if ( $the_query->have_posts() ) : ?>
<ul>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<?php
get_template_part( 'template-parts/children', 'event' ); ?>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</ul>
<?php endif; ?>
</section>
<section class="c-events-list">
<h2 class="events-list-sectionheader"><?php echo __("Vergangene Events", "lauch"); ?></h2>
<?php
$args = array('post_type' => 'page',
'post_parent' => get_the_ID(),
'posts_per_page' => -1,
'meta_key' => 'is_active',
'meta_value' => 0);
$the_query = new WP_Query( $args ); ?>
<?php if ( $the_query->have_posts() ) : ?>
<ul>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<?php
get_template_part( 'template-parts/children', 'event' ); ?>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</ul>
<?php endif; ?>
</section>
<?php
get_footer();