-
Notifications
You must be signed in to change notification settings - Fork 1
/
single.php
97 lines (79 loc) · 2.79 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
<?php get_header(); ?>
<!-- wrapper -->
<div class="wrapper">
<main>
<div class="container">
<div class="row">
<div class="col-12">
<!-- section -->
<section>
<?php if (have_posts()): while (have_posts()) : the_post(); ?>
<!-- article -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- post title -->
<h1 class="post_title"><?php the_title(); ?></h1>
<!-- /post title -->
<hr>
<!-- Date -->
<p>
<span class="author"><?php _e( 'Published by', 'pan-bootstrap' ); ?> <?php the_author_posts_link(); ?></span>
<span class="text-muted">|</span>
<span class="date">
<?php the_time('Y/m/d'); ?> <?php // the_time('H:i:s'); ?>
</span>
<span class="text-muted">|</span>
<span class="comments"><?php if (comments_open( get_the_ID() ) ) comments_popup_link( __( 'Leave your thoughts', 'pan-bootstrap' ), __( '1 Comment', 'pan-bootstrap' ), __( '% Comments', 'pan-bootstrap' )); ?></span>
</p>
<!-- /post details -->
<?php pb_breadcrumb(); ?>
<hr>
<div class="container">
<div class="row">
<div class="col-md-8">
<!-- post thumbnail -->
<?php if ( has_post_thumbnail()) : // Check if Thumbnail exists ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail('large', ['class' => 'img-fluid']); // Fullsize image for the single post ?>
</a>
<hr>
<?php endif; ?>
<!-- /post thumbnail -->
<?php the_content(); // Dynamic Content ?>
<hr>
<p>
<?php the_tags( __( 'Tags: ', 'pan-bootstrap' ), ', ', '<br>'); // Separated by commas with a line break at the end ?>
</p>
<p>
<?php _e( 'Categorised in: ', 'pan-bootstrap' ); the_category(', '); // Separated by commas ?>
</p>
<p class="text-muted"><?php _e( 'This post was written by ', 'pan-bootstrap' ); the_author(); ?></p>
<?php edit_post_link(); // Always handy to have Edit Post Links available ?>
<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
?>
</div>
<?php get_sidebar(); ?>
</div>
</div>
</article>
<!-- /article -->
<?php endwhile; ?>
<?php else: ?>
<!-- article -->
<article>
<h1><?php _e( 'Sorry, nothing to display.', 'pan-bootstrap' ); ?></h1>
</article>
<!-- /article -->
<?php endif; ?>
</section>
<!-- /section -->
</div><!-- /.col-12 -->
</div><!-- /.row -->
</div><!-- /.container -->
</main>
</div>
<!-- /wrapper -->
<?php get_footer(); ?>