<?php manufacto_bunch_global_variable(); 
	$options = _WSH()->option();
	get_header(); 
	if( $wp_query->is_posts_page ) {
		$meta = _WSH()->get_meta('_bunch_layout_settings', get_queried_object()->ID);
		$meta1 = _WSH()->get_meta('_bunch_header_settings', get_queried_object()->ID);
		if(manufacto_set($_GET, 'layout_style')) $layout = manufacto_set($_GET, 'layout_style'); else
		$layout = manufacto_set( $meta, 'layout', 'right' );
		$sidebar = manufacto_set( $meta, 'sidebar', 'default-sidebar' );
		$bg = manufacto_set($meta1, 'header_img');
		$title = manufacto_set($meta1, 'header_title');
		$text = manufacto_set($meta1, 'header_text');
	} else {
		$settings  = _WSH()->option(); 
		if(manufacto_set($_GET, 'layout_style')) $layout = manufacto_set($_GET, 'layout_style'); else
		$layout = manufacto_set( $settings, 'archive_page_layout', 'right' );
		$sidebar = manufacto_set( $settings, 'archive_page_sidebar', 'default-sidebar' );
		$bg = manufacto_set($settings, 'archive_page_header_img');
		$title = manufacto_set($settings, 'archive_page_header_title');
		$text = manufacto_set($settings, 'archive_page_header_text');
	}
	$layout = manufacto_set( $_GET, 'layout' ) ? manufacto_set( $_GET, 'layout' ) : $layout;
	$sidebar = ( $sidebar ) ? $sidebar : 'default-sidebar';
	$layout = ( $layout ) ? $layout : 'right';
	_WSH()->page_settings = array('layout'=>'right', 'sidebar'=>$sidebar);
	$classes = ( !$layout || $layout == 'full' || manufacto_set($_GET, 'layout_style')=='full' ) ? ' col-lg-12 col-md-12 col-sm-12 col-xs-12 ' : ' col-lg-9 col-md-8 col-sm-12 col-xs-12 ' ;
	?>
	
    <!--Page Title-->
    <section class="page-title">
        <div class="auto-container">
            <h1><?php esc_html_e('Our Blog', 'manufacto');?></h1>
            <div class="text"><?php if($text) echo wp_kses_post($text); else 'Graduate study in chemical engineering can lead to a career of research and teaching';?></div>
        </div>
    </section>
    <!--End Page Title-->
    
    <!--Sidebar Page Container-->
    <div class="sidebar-page-container">
        <div class="auto-container">
            <div class="row clearfix">
                
                <!-- sidebar area -->
                <?php if( $layout == 'left' ): ?>
					<?php if ( is_active_sidebar( $sidebar ) ) { ?>
                        <div class="sidebar-side col-lg-3 col-md-4 col-sm-12 col-xs-12">
                            <aside class="sidebar default-sidebar">
                                <?php dynamic_sidebar( $sidebar ); ?>
                            </aside>
                        </div>
                    <?php } ?>
                <?php endif; ?>
                
                <!--Content Side-->	
                <div class="content-side <?php echo esc_attr($classes);?>">
                    
                    <!--Default Section-->
                    <div class="news-classic">
                    
                        <!--Blog Post-->
                        <div class="thm-unit-test">
                        <?php while( have_posts() ): the_post();?>
                            <!-- blog post item -->
                            <!-- Post -->
                            <div id="post-<?php the_ID(); ?>" <?php post_class();?>>
                                <?php get_template_part( 'blog' ); ?>
                            <!-- blog post item -->
                            </div><!-- End Post -->
                        <?php endwhile;?>
                        </div>
                        <!--Styled Pagination-->
                        <div class="styled-pagination">
                            <div class="inner-container clearfix">
                                <div class="clearfix text-center">
                                    <?php manufacto_the_pagination(); ?>
                                </div>
                            </div>
                        </div>
                    
                    </div>
                    
                </div>
                <!--Content Side-->
                
                <!-- sidebar area -->
                <?php if( $layout == 'right' ): ?>
					<?php if ( is_active_sidebar( $sidebar ) ) { ?>
                        <div class="sidebar-side col-lg-3 col-md-4 col-sm-12 col-xs-12">
                            <aside class="sidebar default-sidebar">
                                <?php dynamic_sidebar( $sidebar ); ?>
                            </aside>
                        </div>
                    <?php } ?>
                <?php endif; ?>
                <!--Sidebar-->
            </div>
        </div>
    </div>
<?php get_footer(); ?>