forked from Purdue/purdue-wp-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-faculty_post.php
86 lines (71 loc) · 1.87 KB
/
single-faculty_post.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
<?php
/**
* The template for displaying faculty post (Not Found)
* @package purdue-wp-theme
*/
?>
<?php get_header(); ?>
<main id="site-content" role="main">
<?php
if (function_exists('get_field')) {
$facultyTitle = get_field('title');
$phone = get_field('phone');
$email = get_field('email');
}else{
$facultyTitle = "";
$phone = "";
$email = "";
}
$img = get_the_post_thumbnail_url();
?>
<section class="section">
<div class="container">
<?php if (is_active_sidebar('post-related-content')) : ?>
<div class="columns is-multiline with-sideContent">
<div class="column is-two-thirds-desktop is-full-tablet is-full-mobile">
<h1 id="main-heading"><?php the_title(); ?></h1>
<p class="post__subheading">
<?php echo ($facultyTitle); ?>
</p>
<p class="post__subheading">
<?php echo ($phone); ?>
</p>
<p class="post__subheading">
<?php echo ($email); ?>
</p>
<?php while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; // end of the loop.
?>
</div>
<aside class="column is-one-quarter-desktop is-full-tablet is-full-mobile">
<div class="side-content">
<?php dynamic_sidebar('post-related-content'); ?>
</div>
</aside>
</div>
<?php else : ?>
<div class="columns is-centered">
<div class="column is-two-thirds-desktop is-full-tablet is-full-mobile">
<h1 id="main-heading"><?php the_title(); ?></h1>
<p class="post__subheading">
<?php echo ($facultyTitle); ?>
</p>
<p class="post__subheading">
<?php echo ($phone); ?>
</p>
<p class="post__subheading">
<?php echo ($email); ?>
</p>
<?php while (have_posts()) : the_post(); ?>
\
<?php the_content(); ?>
<?php endwhile; // end of the loop.
?>
</div>
</div>
<?php endif; ?>
</div>
</section>
</main><!-- #site-content -->
<?php get_footer(); ?>