-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader-default.php
More file actions
80 lines (75 loc) · 2.7 KB
/
Copy pathheader-default.php
File metadata and controls
80 lines (75 loc) · 2.7 KB
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
<header id="masthead" class="site-header">
<div class="site-branding">
<?php
$page_for_posts = get_option('page_for_posts');
if ((!is_home()) || (is_single() && 'post' != get_post_type()) ) {
// If this is NOT the blog posts index
$hero = get_the_post_thumbnail_url(get_the_ID(), 'page-hero');
$heroCaption = get_the_post_thumbnail_caption();
}
$page_blurb = get_field('page_blurb');
$degrees_offered = get_field_object('degrees_offered');
$degrees = $degrees_offered['value'];
if ($hero) {
echo '<div class="hero-page flex-wrap" style="background:url(' . $hero . ') no-repeat bottom; background-size: cover;">';
} else {
echo '<div class="no-hero flex-wrap">';
}
?>
<div class="header-runner">
<div class="wrap flex-wrap">
<header class="entry-header flex-wrap">
<div class="entry-header-right">
<span class="entry-header-span-b flex-wrap">
<?php if ('post' === get_post_type()) :
// single_post_title('<h1 class="entry-title">', '</h1>');
echo '<h1 class="entry-title">' . get_the_title($page_for_posts) . '</h1>';
else : the_title('<h1 class="entry-title">', '</h1>');
endif; ?>
</span>
<?php
if ('degree' == get_post_type()) {
echo '<span class="enhero-page try-header-span-c">'; //TODO: Fix this class
if ($degrees) :
echo '<!-- Card Degrees Offered Begin --><div class="card-degrees-offered">';
echo '<ul class="card-list flex-wrap">';
if (in_array('phd', $degrees)) :
echo '<li class="phd">Ph.D.</li>';
endif;
if (in_array('ma', $degrees)) :
echo '<li class="ma">M.A.</li>';
endif;
if (in_array('ms', $degrees)) :
echo '<li class="ms">M.S.</li>';
endif;
if (in_array('designatedemphasis', $degrees)) :
echo '<li class="bs">D.E.</li>';
endif;
if (in_array('contig', $degrees)) :
echo '<li class="ma">4+1</li>';
endif;
if (in_array('ba', $degrees)) :
echo '<li class="ba">B.A.</li>';
endif;
if (in_array('bs', $degrees)) :
echo '<li class="bs">B.S.</li>';
endif;
if (in_array('undergradminor', $degrees) || in_array('gradminor', $degrees)) :
echo '<li class="minor">Min.</li>';
endif;
echo '</ul>';
echo '</div><!-- Panel Degrees Offered End -->';
endif;
}
?></span>
</div>
</header><!-- .entry-header -->
</div><!-- .hero-home wrap -->
</div><!-- .header-runner -->
</div><!-- .site-branding -->
</header><!-- #masthead -->
<?php
if ($heroCaption) {
echo '<div class="wrap"><p class="wp-caption-text thumb-caption-text">' . $heroCaption . '</p></div>';
}
?>