-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
72 lines (47 loc) · 1.55 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
<?php
get_header();
?>
<div class="mid-bar">
</div>
<div class="single-post-column">
<?php
if (have_posts()) :
while(have_posts()) : the_post(); ?>
<article class="post">
<div class="banner-img">
<?php the_post_thumbnail('banner-image');?>
</div>
<h2><a href="<?php the_permalink(); ?>"> <?php the_title(); ?></a></h2>
<p class="post-info">
<?php the_time('F j, Y g:i a'); ?> | by <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>">
<?php echo get_the_author_meta('first_name'); ?></a> | Posted in
<?php
$categories = get_the_category();
$separator = ", ";
$output = '';
if ($categories) {
foreach ($categories as $category) {
$output .= '<a href="' . get_category_link($category -> term_id) . '">' . $category->cat_name . '</a>'. $separator;
}
echo trim($output, $separator);
}
?>
</p>
<div class="single-post-content">
<?php the_content(); ?>
</div>
</article>
<?php endwhile;?>
<div class="comment-separator mid-bar">Comments</div>
<div class="single-post-comments">
<?php comments_template(); ?>
</div>
<?php else :
echo '<p>No content found</p>';
endif;?>
</div>
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-54a0f43a0b3ba61c" async="async"></script>
<?php get_footer();
?>
<!-- Go to www.addthis.com/dashboard to customize your tools -->