-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
140 lines (113 loc) · 4.42 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?php get_header(); ?>
<?php get_template_part("/page-templates/common/blog-hero");
?>
<section class="ftco-section ftco-degree-bg">
<div class="container">
<div class="row">
<?php
while(have_posts()):
the_post();?>
<div class="col-lg-8 ftco-animate">
<p>
<?php
if(has_post_thumbnail()){
the_post_thumbnail("large",array("class"=>"img-fluid"));
}
?>
</p>
<h2 class="mb-3 text-center"><?php the_title();?></h2>
<p><?php
the_content();
wp_link_pages();
?>
</p>
<div class="post-pagination pt-5">
<h3 class="bg-primary text-white"><?php _e('Next & Previous Post');?></h3>
<?php
next_post_link();
echo "<br/>";
previous_post_link();
?>
</div>
<div class="tag-widget post-tag-container mb-5 mt-5">
<div class="tagcloud">
<?php echo get_the_tag_list();?>
</div>
</div>
<div class="about-author d-flex p-4 bg-light">
<div class="bio mr-5">
<?php echo get_avatar( get_the_author_meta( "ID"));?>
</div>
<div class="desc">
<h3><?php echo esc_html(get_the_author_meta( "display_name" )); ?></h3>
<p><?php echo esc_html(get_the_author_meta( "description" )); ?></p>
</div>
</div>
<div class="mt-5">
<div class="related-post pt-5">
<?php if ( function_exists( "the_field" ) ) : ?>
<div>
<h1><?php _e( "Related Posts", "jurist" ); ?></h1>
<?php
$related_posts = get_field( "related_posts" );
$jurist_rp = new WP_Query( array(
'post__in' => $related_posts,
'orderby' => 'post__in',
) );
while ( $jurist_rp->have_posts() ) {
$jurist_rp->the_post();
?>
<a href="<?php the_permalink();?>">
<h4><?php the_title(); ?></h4>
</a>
<?php
}
wp_reset_query();
?>
</div>
<?php endif; ?>
</div>
<div class="pt-5 s-comments-box">
<?php
if(!post_password_required()){
comments_template();
}
?>
</div>
</div>
</div>
<?php endwhile;?>
<div class="col-lg-4 sidebar ftco-animate">
<div class="sidebar-box">
<?php
if(is_search()){
?>
<h3><?php _e("You searched for","jurist") ?>: <?php the_search_query(); ?></h3>
<?php
}
?>
<?php
echo get_search_form();
?>
</div>
<div class="sidebar-box ftco-animate">
<div class="categories">
<h3><?php _e('Categories','jurist');?></h3>
<a href="<?php the_permalink();?>"><?php echo get_the_category_list();?></a>
</div>
</div>
<div class="sidebar-box ftco-animate">
<?php
if ( is_active_sidebar( "sidebar-1" ) ) {
dynamic_sidebar( "sidebar-1" );
}
?>
</div>
</div>
</div>
</div>
</section>
<?php
get_template_part("/page-templates/common/email");
?>
<?php get_footer();?>