<?php
/**
 * The template for displaying the so-called blog pages
 * @package tweaker5
 */
?>

<?php get_header(); ?>
        
	<?php if(is_active_sidebar( 'blog-sidebar' )): ?>
        <section class="col grid-8 site-content" role="main">
    <?php else: ?>
        <section class="col grid-12 site-content" role="main">
    <?php endif; ?>
    
        <?php if ( have_posts() ) : ?>

            <?php while ( have_posts() ) : the_post(); ?>

                <?php get_template_part( 'content', get_post_format() ); ?>

            <?php endwhile; ?>
            
            <?php if (tweaker5_show_posts_nav()) : ?>
                <div class="paginate">
                    <?php tweaker5_paginate(); ?>
                </div><?php // close .paginate ?>
            <?php endif; ?>
            <!-- replace the entire if statement above with '< ?php tweaker5_paging_nav(); ? >' 
            should you prefer the old style navigation. Please remove the spaces from the 
            opening and closing brackets. -->

        <?php else : ?>

            <?php get_template_part( 'content', 'none' ); ?>

        <?php endif; ?>

    </section><?php // close .site-content ?>

    <?php if(is_active_sidebar( 'blog-sidebar' )): ?>
        <?php get_sidebar(); ?>
    <?php endif; ?>
        
<?php get_footer(); ?>