-
Notifications
You must be signed in to change notification settings - Fork 5
/
template-education-updates.php
63 lines (47 loc) · 1.54 KB
/
template-education-updates.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
<?php
/* Template Name: Education Updates */
get_header();
?>
<!-- Main -->
<main class="shrink">
<?php
get_template_part("parts/navigation/breadcrumb");
// Display page content
the_post();
get_template_part('parts/post-type/single');
// Load education updates
$updates = new WP_Query([
'category_name' => 'education-updates',
'posts_per_page' => 3,
]);
if ($updates->have_posts()) { ?>
<div class="row">
<?php
while ($updates->have_posts()) {
$updates->the_post();
?>
<div class="column column-block separator-block news-block">
<?php get_template_part('parts/post-type/excerpt', 'post'); ?>
</div>
<?php
}
wp_reset_postdata();
?>
</div>
<div class="row">
<p class="next-prev-links"><a class="button small" href="<?=get_term_link('education-updates', 'category')?>">
More education updates <i class="fa ch-arrow-right"></i>
</a></p>
</div>
<?php
} else {
?>
<div class="row column column-block">
<h3>Check back soon!</h3>
<p>There are no education updates available at the moment.</p>
</div>
<?php } ?>
</div>
</main>
<?php
get_footer();