-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
53 lines (41 loc) · 1.16 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
<p>'single.php'</p>
<?php
get_header();
if (have_posts()) :
/* the loop */
while (have_posts()) : the_post(); ?>
<article class="post">
<h2><?php the_title(); ?></h2>
<p class="post-info"><?php the_time('F jS, Y @ g:i A'); ?>
by <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>"><?php the_author(); ?>.</a>
Posted in
<?php
$categories = get_the_category();
$seperator = ", ";
$output = '';
if ($categories)
{
foreach ($categories as $category)
{
$output .= '<a href="' . get_category_link($category->term_id) . '">' . $category->cat_name . '</a>' . $seperator;
}
}
echo trim($output,$seperator);
?>
</p>
<?php
the_post_thumbnail('banner-image');
?>
<?php the_content(); ?>
</article>
<?php endwhile; ?>
<!-- Start the pagination functions after the loop. -->
<div class="nav-next alignleft"><?php previous_post_link( ); ?></div>
<div class="nav-previous alignright"><?php next_post_link( ); ?></div>
<!-- End the pagination functions after the loop. -->
<?php
else :
get_template_part('template-empty'); /* matches file name empty.php */
endif;
get_footer();
?>