<?php 
	$custom  = photofolio_custom();
	$header_style = $custom['header_style'];
?>
<?php get_header($header_style);?>


			<!-- page-title section -->
			<section class="page-title-section">
				<div class="container">
					<?php if (function_exists('photofolio_breadcrumb')) { photofolio_breadcrumb(); }?>
					<?php if(is_search()){ ?>
						<h1><?php esc_html_e('Search result for: ','photofolio'); the_search_query(); ?></h1>
					<?php }elseif(is_category()){ ?>
						<h1><?php esc_html_e('Category: ', 'photofolio'); single_cat_title(); ?>
					<?php }else{ ?>	
					<?php $title= $custom['blog_title']; ?>
					<h1><?php if($title!=''){echo esc_html($title); }else{  esc_html_e('BLOG','photofolio'); } ?></h1>
					<?php } ?>
				</div>
			</section>
			<!-- End page-title section -->

			<!-- blog section -->
			<section class="blog-section standart <?php if($custom['blog_layout']!='no-sidebar'){ ?> withsidebar <?php } ?>">
				<div class="container">
					<?php if($custom['blog_layout']!='no-sidebar'){ ?>
					<div class="row">
						<div class="col-md-9">
					<?php } ?>
							<div class="blog-box">

								<?php 
								if(have_posts()) :
												while(have_posts()) : the_post(); 
								?>
								<?php get_template_part( 'content', ( post_type_supports( get_post_type(), 'post-formats' ) ? get_post_format() : get_post_type() ) ); ?>

								<?php endwhile; ?>
								<?php photofolio_pagination($pages=''); ?>
								<?php else: ?>
								<div class="not-found">
										<h1><?php esc_html_e('Nothing Found Here!','photofolio'); ?></h1>
										
								</div>
								<?php endif; ?>
								

							</div>
							
						</div>
						<?php if($custom['blog_layout']!='no-sidebar'){ ?>
						<div class="col-md-3">
							<?php get_sidebar(); ?>
						</div>
						<?php } ?>
					</div>
				</div>
			</section>
			<!-- End blog section -->

			
<?php get_footer($header_style); ?>