-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsingle.php
113 lines (99 loc) · 4.41 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
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package edumark
*/
get_header();
$categories = get_the_category();
$count = count( $categories );
?>
<section <?php post_class( 'blog_area single-post-area section-padding' ) ?> >
<div class="container">
<div class="row">
<div class="col-lg-8 posts-list">
<div class="single-post">
<?php
if( has_post_thumbnail() ){ ?>
<div class="feature-img">
<?php the_post_thumbnail( 'edumark_single_blog_750x375', array( 'class' => 'card-img rounded-0' ) ); ?>
</div>
<?php
} ?>
<div class="blog_details">
<h2 class="p_title"><?php the_title(); ?></h2>
<?php
if( edumark_opt( 'edumark_blog_single_meta', 1 ) == 1 ) {
?>
<ul class="blog-info-link mt-3 mb-4">
<?php if ( has_category() ) {
echo '<li><i class="fa fa-tags"></i>';
echo edumark_post_cats();
echo '</li>';
}
echo '<li>';
echo edumark_posted_comments();
echo '</li>';
?>
</ul>
<?php
}
if( have_posts() ) :
while( have_posts() ) : the_post();
the_content();
// Link Pages
wp_link_pages(
array(
'before' => '<div class="page-links">' . __( 'Pages:', 'edumark' ),
'after' => '</div>',
)
);
// Post visitor count
edumark_set_post_views( get_the_ID() );
endwhile;
endif;
if( has_tag() ){
echo '<div class="tag_list"><span>'.esc_html__( 'Tags:', 'edumark' ).'</span>';
echo edumark_post_tags();
echo '</div>';
}
?>
</div>
</div>
<div class="navigation-top">
<?php
if( edumark_opt('edumark_like_btn') == 1 || edumark_opt('edumark_blog_share') == 1 ) {
?>
<div class="d-sm-flex justify-content-between text-center">
<?php
if ( edumark_opt( 'edumark_like_btn' ) == 1 ) {
echo get_simple_likes_button( get_the_ID() );
}
if ( edumark_opt( 'edumark_blog_share' ) == 1 ) {
echo edumark_social_sharing_buttons( 'social-icons' );
}
?>
</div>
<?php
}
// Post Navigation
edumark_blog_single_post_navigation(); ?>
</div>
<?php
//Author Bio ===============
if( !empty( get_the_author_meta( 'description' ) ) ) {
edumark_author_bio();
}
// 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>
</section>
<?php
get_footer();