-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
89 lines (63 loc) · 3.15 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
<?php
/**
* The template for displaying all single posts.
*
* @package clearthoughts
*/
get_header();
$container = get_theme_mod( 'clearthoughts_container_type' );
$sidebar_pos = get_theme_mod( 'clearthoughts_sidebar_position' );
?>
<div class="wrapper" id="single-wrapper">
<div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row">
<!-- Do the left sidebar check -->
<?php get_template_part( 'global-templates/left-sidebar-check', 'none' ); ?>
<main class="site-main" id="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'loop-templates/content', 'single' ); ?>
<?php endwhile; // end of the loop. ?>
<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) : ?>
<div class="row comments-wrapper">
<div class="col-md-12 col-lg-4">
<?php if (get_the_author_meta('description')) : // Checking if the user has added any author descript or not. If it is added only, then lets move ahead ?>
<table width="100%">
<tr>
<td width="100" class="author-image">
<?php echo get_avatar(get_the_author_meta('user_email'), '80'); // Display the author gravatar image with the size of 100 ?>
</td>
<td><span>AUTHOR:</span>
<h3 class="author-name">
<?php esc_html(the_author_meta('display_name')); // Displays the author name of the posts ?>
</h3>
</td>
</tr>
<tr>
<td colspan="2">
<p class="author-description">
<?php esc_textarea(the_author_meta('description')); // Displays the author description added in Biographical Info ?>
</p>
</td>
</tr>
</table>
<?php endif; ?>
</div>
<div class="col-md-12 col-lg-8">
<?php echo comments_template();?>
</div>
</div>
<!-- #row -->
<?php endif; ?>
</main>
<!-- #main -->
</div>
<!-- #primary -->
</div>
<!-- .row -->
</div>
<!-- Container end -->
</div>
<!-- Wrapper end -->
<?php get_footer(); ?>