forked from okfde/jh-lauch-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommunity-overview.php
88 lines (77 loc) · 2.8 KB
/
community-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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
/**
* Template Name: Community-Seite
* Neu gebaut von Philip im April 2020 aus single-lab.php
*/
$args = array(
'post_type' => 'lab',
'tax_query' => array(
array(
'taxonomy' => 'lab-location',
'field' => 'slug',
'terms' => $community_id, // set in functions.php
),
)
);
$community_query = new WP_Query( $args );
get_header();
while ( $community_query->have_posts() ) :
$community_query->the_post(); ?>
<?php
endwhile; ?>
<header class="c-page-alpaca-header">
<div class="c-page-alpaca-featured medium-up as-s p-r">
<img src="<?php echo get_the_post_thumbnail_url(get_the_ID(), 'blog-alpaka'); ?>"
alt="" class="clip-alpaka" >
<div class="c-page-alpaca-friend">
<?php
$svg = get_random_illustration();
echo replace_svg_css_class_fill(get_svg_content($svg),
"changecolor",
"event-". get_the_ID() ."-" . $svg,
get_field('event_color')); ?>
</div>
</div>
<div class="c-page-alpaca-title">
<?php the_title('<h1 class="c-page-title pt-1">', '</h1>')?>
<div class="c-page-excerpt">
<?php the_content(); ?>
</div>
</div>
<?php if (get_field('illustration_right')) : ?>
<div class="c-page-header-illustration right-top">
<img src="<?php the_field('illustration_right'); ?>" alt="" width="200">
</div>
<?php endif; ?>
</header>
<section class="c-page-section pb-2 mt-2 white addon--relative">
<span class="addon addon--small addon--right addon--top addon--catdog sm-only"></span>
<div class="event-teaser-list">
<h2 class="event-teaser-list-title addon--relative">
<?php echo __('Die nächsten Termine', 'lauch') ?>
<span class="d-b mt-2 addon addon--small addon--catdog sm-up"></span></h2>
<?php if( have_rows('lab_events') ): ?>
<ul class="event-teaser-list-wrapper c-page-content">
<?php while( have_rows('lab_events') ): the_row(); ?>
<?php if (get_sub_field('visible') == TRUE) : ?>
<?php get_template_part('template-parts/event', 'lab') ?>
<?php endif ?>
<?php endwhile ?>
</ul>
<?php endif ?>
</div>
</section>
<section class="c-page-section pb-0 c-page-center addon--relative addon addon--large addon--l-0 addon--top addon--octopus">
<h2 class="ta-c c-event-title"><?php echo __("Über die Online-Community", "lauch"); ?></h2>
<div class="c-page-standard ai-c c-event-info">
<div class="col-l c-event-overview">
<?php the_field('event_facts'); ?>
</div>
</div>
</section>
<?php get_template_part('template-parts/partner', 'lab') ?>
<script>
document.querySelector('html').style.setProperty("--event-single-color", "<?php echo the_field('event_color'); ?>");
</script>
<?php
get_footer();