XylotrechusZ
<?php
get_header();
$sidebar_blog = "";
if(is_active_sidebar('sidebar-blog')){
$sidebar_blog = vapier_blog_sidebar();
}
$layout_blog = vapier_blog_view();
$class_content_blog = 'blog-content-'.esc_attr($layout_blog);
$j=1;
?>
<div class="container">
<div class="category-posts row">
<?php if($sidebar_blog == 'left' && is_active_sidebar('sidebar-blog')):?>
<div class="bwp-sidebar sidebar-blog <?php echo esc_attr(vapier_get_class()->class_sidebar_left); ?>">
<?php dynamic_sidebar( 'sidebar-blog' );?>
</div>
<?php endif; ?>
<div class="cate-post-content <?php echo esc_attr($sidebar_blog); ?> <?php if(is_active_sidebar('sidebar-blog')){ echo esc_attr(vapier_get_class()->class_blog_content); }else{ echo "col-lg-12 col-md-12 col-sm-12 col-12"; } ?>">
<section id="primary" class="content-area">
<div id="content" class="site-content <?php echo esc_attr($class_content_blog);?>" role="main">
<?php if ( have_posts() ) : ?>
<?php
// Start the Loop.
while ( have_posts() ) : the_post();
/*
* Include the post format-specific template for the content. If you want to
* use this in a child theme, then include a file called called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
?>
<?php if($layout_blog=='modern'){
if(($j % 3 == 1) || ($j % 3 == 2)){
?>
<div class="content-<?php if($j % 3 == 1){ ?>modern<?php }else{ ?>moderns<?php } ?>">
<?php } } ?>
<?php get_template_part( 'templates/content/content', $layout_blog); ?>
<?php if($layout_blog=='modern'){
if(($j % 3 == 1) || ($j % 3 == 0)){
?>
</div>
<?php } } ?>
<?php
$j++;
endwhile;
// Previous/next page navigation.
else :
// If no content, include the "No posts found" template.
get_template_part( 'templates/content/content', 'none');
endif;
?>
</div><!-- #content -->
<?php vapier_paging_nav(); ?>
</section><!-- #primary -->
</div>
<?php if($sidebar_blog == 'right' && is_active_sidebar('sidebar-blog')): ?>
<div class="bwp-sidebar sidebar-blog <?php echo esc_attr(vapier_get_class()->class_sidebar_right); ?>">
<?php dynamic_sidebar('sidebar-blog');?>
</div>
<?php endif; ?>
</div>
</div>
<?php
get_footer();