forked from vcualtlab/online-vcu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
137 lines (96 loc) · 5.05 KB
/
single.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?php get_header(); ?>
<div class="content">
<div class="inner-content">
<main class="main" role="main" itemscope itemprop="mainContentOfPage" itemtype="http://schema.org/Blog">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('cf program'); ?> role="article" itemscope itemprop="blogPost" itemtype="http://schema.org/BlogPosting">
<aside class="program-details entry-content">
<?php
$output = "";
$department = get_field('department');
$degree = get_field('degree');
$subject = get_field('subject');
$commitment = get_field('commitment');
$min_credits = get_field('minimum_credit_hours');
$credits_additional = get_field('credit_hours_additional');
$min_gpa = get_field('minimum_gpa_for_admission');
$mode = get_field('mode');
$links = get_field('links');
$program_website = get_field('links_program_website');
$curriculum = get_field('links_curriculum');
$request_info = get_field('links_request_information');
$clean_info = str_replace("mailto:", "", $request_info);
if ( $department || $degree || $subject ){
$output .= "<p>";
}
if( $department ){
$output .= "<span class='line'><strong>{$department}</strong></span>";
}
if( $degree || $subject ){
$output .= "<span class='line'><strong>{$degree} <br> {$subject}</strong></span>";
}
if ( $department || $degree || $subject ){
$output .= "</p>";
}
if ($commitment || $min_credits || $min_gpa ) {
$output .= "<p>";
}
if ($commitment){
$output .= "<span class='line'><strong>{$commitment}</strong></span>";
}
if ($min_credits || $credits_additional){
$output .="<span class='line'><strong>{$min_credits}</strong> min credit hours
</span>";
$output .="<span class='line'>{$credits_additional}</span>";
}
if ($min_gpa){
$output .= "<span class='line'><strong>{$min_gpa}</strong> min GPA for admission<span>";
}
if ($commitment || $min_credits || $min_gpa ) {
$output .= "</p>";
}
if ($mode){
$output .= "<p class='mode'><strong>{$mode}</strong><span class='popup'>This is your amazing description that will answer all your questions.</span></p>";
}
$output .= "<ul id='details'>";
$output .= "<li id='calculator'><a href='https://accounting.vcu.edu/tuition/calculator/'>Tuition Calculator</a></li>";
if ($program_website){
$output .= "<li><a href='{$program_website}'>Website</a></li>";
}
if ($curriculum){
$output .= "<li><a href='{$curriculum}'>Curriculum</a></li>";
}
if ($request_info){
$output .= "<li><a href='{$request_info}'>Request Info at {$clean_info}</a></li>";
}
if( have_rows('links') ): while ( have_rows('links') ) : the_row();
$link_url = get_sub_field('link_url');
$link_text = get_sub_field('link_text');
$output .= "<li><a href='{$link_url}'>{$link_text}</a>";
endwhile;
endif;
$output .= "</ul>";
echo $output;
?>
</aside>
<section class="entry-content cf" itemprop="articleBody">
<?php the_content(); ?>
</section>
</article> <?php // end article ?>
<?php endwhile; ?>
<?php else : ?>
<article id="post-not-found" class="hentry">
<header class="article-header">
<h1><?php _e( 'Oops, Post Not Found!', 'bonestheme' ); ?></h1>
</header>
<section class="entry-content">
<p><?php _e( 'Uh Oh. Something is missing. Try double checking things.', 'bonestheme' ); ?></p>
</section>
<footer class="article-footer">
<p><?php _e( 'This is the error message in the single.php template.', 'bonestheme' ); ?></p>
</footer>
</article>
<?php endif; ?>
</main>
</div>
</div>
<?php get_footer(); ?>