-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
106 lines (83 loc) · 4.13 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
<?php
/**
* The template for displaying posts
*
* @package juliet
*/
?>
<?php get_header(); ?>
<?php
$juliet_posts_meta_show = juliet_get_option('juliet_posts_meta_show');
$juliet_posts_date_show = juliet_get_option('juliet_posts_date_show');
$juliet_posts_category_show = juliet_get_option('juliet_posts_category_show');
$juliet_posts_author_show = juliet_get_option('juliet_posts_author_show');
$juliet_posts_tags_show = juliet_get_option('juliet_posts_tags_show');
$juliet_posts_sidebar = juliet_get_option('juliet_posts_sidebar');
$juliet_posts_featured_image_show = juliet_get_option('juliet_posts_featured_image_show');
?>
<?php if($juliet_posts_sidebar == 1) { ?><div class="row two-columns"><div class="main-column col-md-9"><?php }
else { ?><div class="row one-column"><div class="main-column col-md-12"><?php } ?>
<?php while ( have_posts() ) : the_post(); ?>
<!-- Post Content -->
<div id="post-<?php the_ID(); ?>" <?php post_class('entry entry-post'); ?>>
<div class="entry-header">
<?php if($juliet_posts_meta_show == 1 && $juliet_posts_category_show == 1) { ?>
<div class="entry-meta">
<div class="entry-category"><?php the_category( ' ~ ' ); ?></div>
</div>
<?php } ?>
<?php $title = get_the_title(); ?>
<?php if($title == '') { ?>
<h1 class="entry-title"><?php esc_html_e('Post ID: ', 'juliet'); the_ID(); ?></h1>
<?php } else { ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php } ?>
<?php if($juliet_posts_meta_show == 1 && ($juliet_posts_author_show == 1 || $juliet_posts_date_show == 1) ) { ?>
<div class="entry-meta">
<?php
$juliet_temp = array();
if($juliet_posts_author_show == 1) $juliet_temp[] = '<div class="entry-author"><span class="vcard author author_name"><span class="fn">' . esc_html_e('by ', 'juliet') . get_the_author() . '</span></span></div>';
if($juliet_posts_date_show == 1) $juliet_temp[] = '<div class="entry-date date updated">' . get_the_date() . '</div>';
if($juliet_temp) $juliet_str = implode('<span class="sep"> - </span>', $juliet_temp);
echo $juliet_str;
?>
</div>
<?php } ?>
<div class="clearfix"></div>
</div>
<?php
if($juliet_posts_featured_image_show == 1) {
if(has_post_thumbnail()) { ?>
<div class="entry-thumb"><?php the_post_thumbnail( 'full', array( 'alt' => get_the_title(), 'class'=>'img-responsive' ) ); ?></div><?php }
} ?>
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages(); ?>
</div>
<?php if ( $juliet_posts_meta_show == 1 && $juliet_posts_tags_show == 1 && has_tag() ) { ?>
<div class="entry-footer">
<div class="entry-meta">
<div class="entry-tags"><?php the_tags('',''); ?></div>
</div>
</div>
<?php } ?>
</div>
<!-- /Post Content -->
<hr />
<div class="pagination-post">
<div class="previous_post"><?php previous_post_link('%link','%title'); ?></div>
<div class="next_post"><?php next_post_link('%link','%title'); ?></div>
</div>
<!-- Post Comments -->
<?php if ( comments_open() ) : ?>
<hr />
<?php comments_template(); ?>
<?php endif; ?>
<!-- /Post Comments -->
</div>
<!-- /Main Column -->
<?php if($juliet_posts_sidebar == 1) get_sidebar(); ?>
</div>
<!-- /Two Columns -->
<?php endwhile; ?>
<?php get_footer(); ?>