-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-subjects.php
84 lines (70 loc) · 2.31 KB
/
page-subjects.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
<?php /* Template Name: Subjects */?>
<?php get_header(); ?>
<?php get_template_part("template-parts/page-banner")?>
<div class="metabox section-width">
<?php $homePage = get_page_by_title("Home Page");?>
<a class="metabox-item metabox-link--home metabox-link--home-single" href="<?php echo get_permalink($homePage->ID); ?>"><i class="fa fa-home" aria-hidden="true"></i> Home</a>
</div>
<section class="subjects section-width">
<div class="subjects--year first-year-subjects">
<?php
$firstYearSubjects = new WP_Query(array(
"post_type" => "program",
"category_name" => "First Year Subjects",
"posts_per_page" => -1,
"orderby" => "name",
"order" => "ASC"
));
?>
<h1>First Year Subjects</h1>
<?php
while($firstYearSubjects->have_posts()) {
$firstYearSubjects->the_post(); ?>
<div class="post-item post-item--subjects">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
</div>
<?php }
?>
</div>
<div class="subjects--year third-year-subjects">
<?php
$thirdYearSubjects = new WP_Query(array(
"post_type" => "program",
"category_name" => "Third Year Subjects",
"posts_per_page" => -1,
"orderby" => "name",
"order" => "ASC"
));
?>
<h1>Third Year Subjects</h1>
<?php
while($thirdYearSubjects->have_posts()) {
$thirdYearSubjects->the_post(); ?>
<div class="post-item post-item--subjects">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
</div>
<?php }
?>
</div>
<div class="subjects--year sixth-seventh-year-subjects">
<?php
$sixthSeventhYearSubjects = new WP_Query(array(
"post_type" => "program",
"category_name" => "Sixth and Seventh Year Subjects",
"posts_per_page" => -1,
"orderby" => "name",
"order" => "ASC"
));
?>
<h1>Sixth & Seventh Year Subjects</h1>
<?php
while($sixthSeventhYearSubjects->have_posts()) {
$sixthSeventhYearSubjects->the_post(); ?>
<div class="post-item post-item--subjects">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
</div>
<?php }
?>
</div>
</section>
<?php get_footer(); ?>