-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate-blog-left-sidebar.php
executable file
·58 lines (56 loc) · 1.67 KB
/
template-blog-left-sidebar.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
<?php
/* Template Name: Blog Left Sidebar */
get_header();
?>
<section class="defpages">
<div class="container">
<h1 class="designr-h1"><?php the_title();?></h1>
</div>
</section>
<section class="page-content">
<div class="container">
<div class="row">
<div class="col-sm-4 sidebar-padding">
<div class="page-sidebar <?php if($designr['card-sid-switch']==1){ echo 'card';}?>">
<?php dynamic_sidebar( 'sidebarblog' ); ?>
</div>
</div>
<div class="col-sm-8 page-maincontent blog-wrap">
<?php
$paged = ( get_query_var( 'paged' ) ) ? absint( get_query_var( 'paged' ) ) : 1;
global $wp_query;
$wp_query = new WP_Query("post_type=post&paged=".$paged);
if(!$wp_query->have_posts()){
echo '<h2>';
echo __('No posts found.','designr');
echo '</h2>';}
while($wp_query->have_posts()){
$wp_query->the_post();
$rauthor = get_the_author_meta('first_name');
$rauthorln = get_the_author_meta('last_name');?>
<div <?php post_class("blogpost");?>>
<a href="<?php the_permalink();?>"><?php the_post_thumbnail('designr_blog2');?></a>
<div class="posted"><?php echo __('Posted on ','designr'); echo get_the_date();?></div>
<h2><a href="<?php the_permalink();?>"><?php the_title();?></a></h2>
<?php
if(strstr($post->post_content,'<!--more-->')) {
?>
<p>
<?php
echo get_the_excerpt();?> <a href="<?php the_permalink();?>"><?php echo __('Read More','designr');?></a></p>
<?php
}
else {
the_excerpt();
}
?>
</div>
<?php } ?>
<div class="site-pagination">
<?php designr_paginate_links();?>
</div>
</div>
</div>
</div>
</section>
<?php get_footer();?>