-
Notifications
You must be signed in to change notification settings - Fork 5
/
template-career-dashboard.php
76 lines (66 loc) · 2.82 KB
/
template-career-dashboard.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
<?php
/* Template Name: Career Dashboard */
get_header();
get_template_part("parts/navigation/breadcrumb");
?>
<!-- Main -->
<main>
<div class="row column">
<?php
the_content();
?>
</div>
<!-- Calendar / News -->
<div class="section-even calendar-news">
<div class="row">
<div class="column column-block medium-5 large-4">
<?php get_template_part('parts/misc/career', 'selector'); ?>
<?php get_template_part('parts/misc/career', 'calendar'); ?>
</div>
<div class="column medium-7 large-8">
<section class="wisv-panel">
<div class="wisv-panel-heading">
<h1 class="small">Latest Job Openings
<small><a href="<?php echo get_post_type_archive_link('job_opening') ?>">View more <i class="fa ch-arrow-right"></i></a></small>
</h1>
</div>
<div class="wisv-panel-content">
<?php
// Get most recent job openings
$job_openings = new WP_Query([
'post_type' => 'job_opening',
'posts_per_page' => 3,
'orderby' => 'date',
'order' => 'DESC',
'meta_query' => [
[
'key' => '_company_id',
'value' => '',
'compare' => '!=',
],
],
]);
// Render job openings
iF ($job_openings->have_posts()) {
while ($job_openings->have_posts()) {
$job_openings->the_post();
get_template_part('parts/post-type/excerpt', 'job_opening');
}
wp_reset_postdata();
} else {
?>
<div class="row column">
<h3>No content available</h3>
<p>There are no job openings available at the moment.</p>
</div>
<?php
}
?>
</div>
</section>
</div>
</div>
</div>
</main>
<?php
get_footer();