<?php
/**
* @author rs-theme
* @since 1.0
* @version 1.0
*/
get_header();
get_template_part( 'inc/page-header/breadcrumbs-archive' );
?>
<div id="rs-blog" class="rs-blog blog-page">
<?php
//checking blog layout form option
$col='';
$blog_layout='';
$column='';
$blog_grid='';
if(!empty($advokat_option['blog-layout']) || !is_active_sidebar( 'sidebar-1' )){
$blog_layout = !empty($advokat_option['blog-layout']) ? $advokat_option['blog-layout'] : '';
$blog_grid = !empty($advokat_option['blog-grid']) ? $advokat_option['blog-grid'] : '';
$blog_grid = !empty($blog_grid) ? $blog_grid : '12';
if($blog_layout == 'full' || !is_active_sidebar( 'sidebar-1' ))
{
$layout ='full-layout';
$col = '-full';
$column = 'sidebar-none';
}
elseif($blog_layout == '2left')
{
$layout = 'full-layout-left';
}
elseif($blog_layout == '2right')
{
$layout = 'full-layout-right';
}
else{
$col = '';
$blog_layout = '';
}
}
else{
$col='';
$blog_layout='';
$layout='';
$blog_grid='12';
}
?>
<div class="container">
<div id="content">
<div class="row padding-<?php echo esc_attr( $layout) ?>">
<div class="col-md-12 col-lg-8<?php echo esc_attr($col); ?> <?php echo esc_attr($layout); ?>">
<div class="row">
<?php
if ( have_posts() ) :
/* Start the Loop */
while ( have_posts() ) : the_post();
$post_id = get_the_id();
?>
<?php
$no_thumb = "";
$no_redux = "";
if ( !has_post_thumbnail() ) {
$no_thumb = "no-thumbs";
}
if(!class_exists( 'ReduxFrameworkPlugin' )){
$no_redux = "default-meta";
}
?>
<div class="col-sm-<?php echo esc_attr($blog_grid);?> col-xs-12">
<article <?php post_class();?>>
<div class="blog-item <?php echo esc_attr($no_thumb); ?> <?php echo esc_attr($no_redux); ?>">
<div class="blog-img">
<?php if ( has_post_thumbnail() ) { ?>
<a href="<?php the_permalink();?>">
<?php
the_post_thumbnail();
?>
<?php } ?>
</a>
</div><!-- .blog-img -->
<div class="content-wrapper">
<div class="blog-img-content">
<h3 class="blog-title blog-title-blog">
<a href="<?php the_permalink();?>">
<?php the_title();?>
</a>
</h3>
<!-- End date meta value -->
<ul class="has-date-sec">
<!-- Start date meta value -->
<?php
if(!empty($advokat_option['blog-date'])):
if ($advokat_option['blog-date'] == 1):
if ( has_post_thumbnail() ) { ?>
<li class="blog-item blog-dates">
<span class="month-name"><?php echo get_the_date(); ?></span>
</li>
<?php } else { ?>
<li class="blog-item">
<span class="month-name"><?php echo get_the_date(); ?></span>
</li>
<?php }
endif;
else:
if(!class_exists( 'ReduxFrameworkPlugin' )){ ?>
<li class="default-meta">
<?php $post_date = get_the_date(); echo esc_attr($post_date);?>
</li>
<?php }
endif;
?>
<!-- Start author meta value -->
<?php if(!empty($advokat_option['blog-author-post'])){
if ($advokat_option['blog-author-post'] == 'show'): ?>
<li class="author meta">
<?php echo get_the_author(); ?>
</li>
<?php endif; }
else{ ?>
<li class="authormeta">
<?php echo get_the_author(); ?>
</li>
<?php }; ?>
<!-- End author meta value -->
<!-- Start category meta value -->
<?php
if(!empty($advokat_option['blog-category'])){
if($advokat_option['blog-category'] == 'show'){
if(get_the_category()){?>
<li class="metas">
<span class="category-name">
<?php the_category(', '); ?>
<?php if(has_tag()): ?>
<?php endif;?>
</span>
</li>
<?php }
}
}
else{
if(get_the_category()){?>
<li class="metas">
<span class="category-name">
<?php the_category(', '); ?>
</span>
</li>
<?php
}
} ?>
<!-- End category meta value -->
</ul>
</div>
<div class="full-blog-content">
<div class="blog-desc">
<?php the_excerpt();?>
</div>
<?php
$no_view = "";
if(!empty($advokat_option['blog_readmore'])):?>
<div class="blog-button <?php echo esc_attr($no_view); ?>">
<a href="<?php the_permalink();?>">
<?php echo esc_html($advokat_option['blog_readmore']); ?>
</a>
</div>
<?php endif; ?>
<?php if(empty($advokat_option['blog_readmore'])):?>
<div class="blog-button <?php echo esc_attr($no_view); ?>">
<a href="<?php the_permalink();?>"><?php esc_html_e('Continue Reading', 'advokat');?></a>
</div>
<?php endif; ?>
<div class="clear"></div>
</div>
</div><!-- .content-wrapper -->
</div>
</article>
</div>
<?php
endwhile;
wp_reset_postdata();
?>
</div>
<div class="pagination-area">
<?php
the_posts_pagination();
?>
</div>
<?php
else :
get_template_part( 'template-parts/content', 'none' );
endif; ?>
</div>
<?php if( $layout != 'full-layout' ):
get_sidebar();
endif;
?>
</div>
</div>
</div>
</div>
<?php
get_footer();