forked from okfde/jh-lauch-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlab-overview.php
48 lines (39 loc) · 1.12 KB
/
lab-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
<?php
/**
* Template Name: Lab Übersicht
*/
get_header();
?>
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/header-alpaka', get_post_type() );
?>
<section class="c-blog-list is-grid pt-10">
<?php
$args = array('post_type' => 'lab',
'posts_per_page' => -1,
'tax_query' => array(
array(
'taxonomy' => 'lab-location',
'field' => 'slug',
'terms' => $community_id, // set in functions.php
'operator' => 'NOT IN', // this line excludes the community
),
)
);
$the_query = new WP_Query( $args ); ?>
<?php if ( $the_query->have_posts() ) : ?>
<ul class="">
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<?php
get_template_part( 'template-parts/children', 'lab' ); ?>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</ul>
<?php endif; ?>
</section>
<?php get_template_part('template-parts/partner', 'lab') ?>
<?php
endwhile;
get_footer();