-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
141 lines (67 loc) · 3.27 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
138
139
140
141
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package WordPress
* @subpackage studentlifeUOL
* @author Jez Thompson <[email protected]>
* @since 1.0
* @version 1.0
*/
get_header();
?>
<?php get_template_part( 'template-parts/featured-image' ); ?>
<main id="main" class="site-main">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="site-module">
<div class="module-inner-wrap site-module">
<div class="columns-wrap flex-controlled">
<div class="column-spacings column column--2-of-3 column--medium-2-of-3 column--small-1-of-1 clear ">
<?php get_template_part( 'template-parts/content', get_post_type() ); ?>
<?php
if(get_the_tag_list()) {
echo get_the_tag_list('<dl class="tags" ><dt>Tagged:</dt><dd>',', </dd><dd>','</dd></dl>');
}
?>
<?php
//Is there a next or previous post?
$prev_link = get_previous_post_link();
$next_link = get_next_post_link();
//Get the next or previous link url
$previous = get_previous_post();
$next = get_next_post();
?>
<?php if ($prev_link || $next_link): ?>
<ul class="single-pagination">
<li class="single-pagination__link">
<?php if ($prev_link) : ?>
<a class="main-btn block-button dark" href="<?php echo $previous->guid ?>"><i class="far fa-angle-left"></i> Previous Post</a>
<?php endif; ?>
</li>
<li class="single-pagination__link">
<?php if ($next_link) : ?>
<a class="main-btn block-button dark" href="<?php echo $next->guid ?>">Next Post <i class="far fa-angle-right"></i></a>
<?php endif; ?>
</li>
</ul><!-- single-pagination -->
<?php endif; ?>
<?php get_template_part( 'template-parts/meet-author' ); ?>
<?php if ( comments_open() || get_comments_number() ) : ?>
<div class="comments-container">
<?php comments_template(); ?>
</div> <!-- comments-container -->
<?php endif; ?>
</div> <!--column-->
<div class="column-spacings column column--1-of-3 column--medium-1-of-3 column--small-1-of-1 clear ">
<?php get_template_part( 'template-parts/sidebar-standard');?>
</div> <!--column-->
</div> <!--columns-wrap-->
</div> <!--module-inner-wrap-->
<?php endwhile; ?>
<?php endif; wp_reset_query(); ?>
</div> <!--content-container-->
</main><!-- #main -->
<?php get_footer(); ?>