forked from okfde/jh-lauch-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive-exchange.php
78 lines (63 loc) · 1.71 KB
/
archive-exchange.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
75
76
77
78
<?php
/**
* Template Name: Austausch Übersicht Neu
*/
get_header();
?>
<?php
$args = array(
'post_type' => 'page',
'meta_query' => array(
array(
'key' => '_wp_page_template',
'value' => 'exchange-overview.php'
)
)
);
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {
$the_query->the_post();
get_template_part( 'template-parts/header-alpaka', get_post_type() );
}
}
wp_reset_postdata();
?>
<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();