-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtaxonomy-oer-topics.php
59 lines (50 loc) · 1.48 KB
/
taxonomy-oer-topics.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
<?php
/**
* Template Name: OER-Kategorien
*/
get_header();
$term = get_query_var('term');
$term = get_term_by('slug', $term, 'oer-topics');
$image = get_field('topic-picture', $term->taxonomy . '_' . $term->term_id);
$args = array(
'post_type' => 'page',
'meta_query' => array(
array(
'key' => '_wp_page_template',
'value' => 'oer-overview.php'
)
)
);
$overview = get_posts($args);
?>
<header class="c-page-alpaca-header">
<div class="c-page-alpaca-featured medium-up as-s p-r">
<img src="<?php echo wp_get_attachment_image_src( $image, 'blog-alpaka' )[0]; ?>"
alt="" class="clip-alpaka">
</div>
<div class="c-page-alpaca-title">
<nav class="c-breadcrumb" aria-label="breadcrumb">
<ol>
<li>
<a href="<?php echo get_post_permalink($overview[0]->ID); ?>">OER</a>
</li>
</ol>
</nav>
<h1 class="c-page-title pt-1"><?= get_queried_object()->name;?></h1>
<div class="c-page-excerpt">
<?= get_queried_object()->description; ?>
</div>
</div>
</header>
<section class="c-blog-list is-grid pt-5">
<ul>
<?php
$term_posts = new WP_Query($query_string."&posts_per_page=-1");
while ( $term_posts->have_posts() ) : $term_posts->the_post(); ?>
<?php
get_template_part( 'template-parts/children', 'oer' ) ?>
<?php endwhile; ?>
</ul>
</section>
<?php
get_footer();