-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsingle.php
More file actions
152 lines (138 loc) · 5.65 KB
/
Copy pathsingle.php
File metadata and controls
152 lines (138 loc) · 5.65 KB
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
141
142
143
144
145
146
147
148
149
150
151
152
<?php get_header();?>
<?php
/* The loop starts here. */
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
$author_avatar_url = get_user_meta(get_the_author_meta( 'ID' ), "listingpro_author_img_url", true);
$avatar ='';
if(!empty($author_avatar_url)) {
$avatar = $author_avatar_url;
} else {
$avatar_url = listingpro_get_avatar_url (get_the_author_meta( 'ID' ), $size = '51' );
$avatar = $avatar_url;
}
global $listingpro_options;
$blog_detail_template = $listingpro_options['blog_single_template'];
$blog_sidebar_style = $listingpro_options['blog_sidebar_style'];
$blog_detail_class = '12';
if( $blog_detail_template == 'left_sidebar' || $blog_detail_template == 'right_sidebar' )
{
$blog_detail_class = '8';
}
$lp_page_banner = get_post_meta( $post->ID, 'lp_listingpro_options', true );
if( !empty( $lp_page_banner ) && array_key_exists( 'lp_post_banner', $lp_page_banner ) ){
$lp_page_banner = $lp_page_banner['lp_post_banner'];
}
else
{
$lp_page_banner = get_the_post_thumbnail_url( $post->ID, 'full' );
}
?>
<!--==================================Single Banner =================================-->
<div class="blog-single-page" style="background-image:url(<?php echo $lp_page_banner; ?>);">
<div class="blog-heading-inner-container text-center">
<div class="lp-blog-user-thumb">
<img class="avatar" src="<?php echo $avatar; ?>" alt="author Image" />
</div>
<h1 class="padding-bottom-15"><?php echo get_the_title(); ?></h1>
<?php if (function_exists('listingpro_breadcrumbs')) listingpro_breadcrumbs(); ?>
<ul class="lp-blog-grid-author ">
<li>
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
<i class="fa fa-user"></i>
<span><?php the_author(); ?></span>
</a>
</li>
<li>
<i class="fa fa-calendar"></i>
<span><?php the_date(get_option('date_format')); ?></span>
</li>
</ul><!-- ../lp-blog-grid-author -->
</div>
<div class="page-header-overlay"></div>
</div><!-- ..-->
<!--==================================Section Open=================================-->
<section class="aliceblue">
<div class="container page-container-second page-container-second-blog">
<div class="row">
<div class="blog-single-inner-container lp-border lp-border-radius-8 <?php echo $blog_detail_template; ?>">
<?php
if( $blog_detail_template == 'left_sidebar' )
{
if( $blog_sidebar_style == 'sidebar_style1' ){
echo '<div class="col-md-4"><div class="sidebar-style1 listing-second-view">';
get_sidebar();
echo '</div></div>';
}else{
echo '<div class="col-md-4"><div class="sidebar-style2 listing-second-view">';
get_sidebar();
echo '</div></div>';
}
}
?>
<div class="col-md-<?php echo $blog_detail_class; ?>">
<div class="blog-content-outer-container">
<div class="blog-content popup-gallery">
<?php the_content(); ?>
</div>
<div class="blog-meta clearfix">
<div class="blog-tags pull-left">
<ul>
<li><i class="fa fa-tag"></i></li>
<?php
$posttags = get_the_tags();
if ($posttags) {
foreach($posttags as $tag) {
echo ' <li><a href="' .get_tag_link($tag->term_id). '">#' .$tag->name. '</a></li>';
}
}
?>
</ul>
</div>
<div class="blog-social pull-right listing-second-view">
<ul class="post-stat">
<li class="reviews sbutton">
<?php listingpro_sharing(); ?>
</li>
</ul>
</div>
</div>
<div class="blog-pagination clearfix">
<?php
$nextpostString = esc_html__("Next", "listingpro").' <i class="fa fa-angle-double-right" aria-hidden="true"></i>';
$prevpostString = '<i class="fa fa-angle-double-left" aria-hidden="true"></i> '.esc_html__("Previous", "listingpro");
?>
<div class="pull-left"><?php previous_post_link('%link', $prevpostString, false); ?></div>
<div class="pull-right"><?php next_post_link( '%link', $nextpostString, false ); ?></div>
</div> <!-- end navigation -->
<?php
comments_template();
?>
</div>
</div>
<?php
if( $blog_detail_template == 'right_sidebar' )
{
if( $blog_sidebar_style == 'sidebar_style1' ){
echo '<div class="col-md-4 listing-second-view"><div class="sidebar-style1 listing-second-view">';
get_sidebar();
echo '</div></div>';
}else{
echo '<div class="col-md-4 listing-second-view"><div class="sidebar-style2 listing-second-view">';
get_sidebar();
echo '</div></div>';
}
}
?>
<div class="clearfix"></div>
</div>
</div>
</div>
</section>
<!--==================================Section Close=================================-->
<?php
} // end while
} // end if
?>
<?php get_footer();?>