<?php
get_header();

if(is_front_page()){

$layout = maybe_unserialize( get_theme_mod( 'onepage_modules', array( 'welcome', 'pages' , 'services', 'statistics', 'testimonials') ) );

if (!empty($layout)) {
    foreach ($layout as $module => $val) {
        get_template_part('templates/module', $val);
    }
}

} // if

else {?>
<div <?php post_class(); ?>>
    <div class="col-md-12 blog_post">
        <div class="container">
            <div class="row">
                <?php
                if(have_posts()) {
                    while(have_posts()) {
                        the_post();
                        get_template_part('templates/content', 'blog-post');
                    }
                }
                ?>
            </div>
             <div class="post-pagination">
                <?php
                echo paginate_links();
                ?>
            </div>
        </div>
    </div>
</div>  
<?php
}
get_footer();