<?php
if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
}
get_header();
    // Get Theme Options from Database
	$theme_options = pmthemes_theme_options();
echo '<div id="wrap" class="clearfix">';
    echo '<section id="content" class="primary" role="main">';
        // Display Featured Post Slideshow if activated
        if ( isset($theme_options['slider_activated_blog']) and $theme_options['slider_activated_blog'] == true ) :
            get_template_part( 'template-parts/featured-content-slider' );
        endif;
            if ( $theme_options['pmth_grid_col_opt'] == 'pmth-grid-coln' ) {
                $gridopt = $theme_options['pmth_grid_column'];
            } else {
                $gridopt = $theme_options['pmth_grid_width'];
            }
        echo '<div class="pmth-grid '. $gridopt .'">';
            if (have_posts()) :
                while (have_posts()) : the_post();
                    get_template_part( 'template-parts/content', $theme_options['posts_length'] );
                endwhile;
            endif;
        echo '</div>';
        pmthemes_display_pagination();
     echo '</section>';
		get_sidebar();
echo '</div>';
get_footer();
?>