-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathexchange-overview.php
61 lines (49 loc) · 1.42 KB
/
exchange-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
61
<?php
/**
* Template Name: Austausch Übersicht Neu
*/
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' => 'exchange',
'posts_per_page' => -1,
'meta_key' => 'is_current',
'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', 'exchange' ); ?>
<?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' => 'exchange',
'posts_per_page' => -1,
'meta_key' => 'is_current',
'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', 'exchange' ); ?>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</ul>
<?php endif; ?>
</section>
<?php
get_sidebar();
get_footer();