<?php
/*
  Template Name: Blog
 */
get_header();

$fronPage_blog = is_front_page() ? true : false; ?>

<?php $wp_query = new WP_Query(array('post_type' => 'post', 'paged' => get_query_var('paged'), 'post_status' => 'publish'));
if ($wp_query->have_posts()) : ?>

    <article class="article-container" itemscope itemtype="http://schema.org/Article" role="main">
        <div class="row-fluid">

            <?php $get_meta = get_post_custom($post->ID); ?>
            
            <div class="article-content">
                <?php if ( !$fronPage_blog ){ ?>
                <header>
                    <?php serpentsoft_single_breadcrumb(); ?>

                    <h1 itemprop="headline"><?php the_title(); ?></h1>

                    <?php serpentsoft_single_meta_info(); ?>

                </header>
                <?php } ?>
                
                <span class="clearfix"></span>

                <div class="post-entry" itemprop="articleBody">
                    <?php the_content(); ?>
                </div>
                
                <!-- Blog Loop Blog -->

                <div class="blog">
                    <ul class="media-list">
                        <?php while ($wp_query->have_posts()) : $wp_query->the_post(); 
                            get_template_part('loop', 'blog');
                        endwhile; ?>
                    </ul>

                    <div class="row-fluid paging-footer">

    <?php serpentsoft_bootstrap_pagination(); ?>

                    </div>

                </div>

            </div> <!-- article-content -->
        </div>

    </article>

<?php endif; ?>

<?php wp_reset_query(); ?>

<?php get_footer(); ?>