<?php
/**
 * single.php
 * @package WordPress
 * @subpackage Froday
 * @since Froday 1.0
 * 
 */
 ?>

<?php get_header(); ?>
<main id="mainContent" class="main-content">
	<div class="page-container ptb-60">
		<div class="container">
			<div class="row row-rl-10 row-tb-20">
				<?php if( ot_get_option( 'layout_set' ) == 'left-sidebar') { ?>
					<div class="page-sidebar col-md-4">
						<?php if ( is_active_sidebar( 'blog-sidebar' ) ) { ?>
						<aside class="sidebar blog-sidebar">
							<div class="row row-tb-10">
								<?php dynamic_sidebar( 'blog-sidebar' ); ?>
							</div>
						</aside>
						<?php } ?>
					</div>
					<div class="page-content col-md-8">
						<div class="blog-area blog-classic right-sidebar">
							<div class="row row-tb-20">
								<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

								   <?php  get_template_part( 'post-format/single', get_post_format() ); ?>

								<?php endwhile; ?>
								
									<?php get_template_part('includes/related-posts'); ?> 
									
									<?php comments_template(); ?>
									
								<?php else : ?>

								  <h2><?php esc_html_e('No Posts Found', 'froday') ?></h2>

								<?php endif; ?>
							
							</div>
						</div>
					</div>
				<?php } elseif( ot_get_option( 'layout_set' ) == 'full-width') { ?>
					<div class="page-content col-md-12">
						<div class="blog-area blog-classic right-sidebar">
							<div class="row row-tb-20">
								<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

								   <?php  get_template_part( 'post-format/single', get_post_format() ); ?>

								<?php endwhile; ?>
								
									<?php get_template_part('includes/related-posts'); ?> 
									
									<?php comments_template(); ?>
									
								<?php else : ?>

								  <h2><?php esc_html_e('No Posts Found', 'froday') ?></h2>

								<?php endif; ?>
							
							</div>
						</div>
					</div>
				<?php } else { ?>
					<?php if ( is_active_sidebar( 'blog-sidebar' ) ) { ?>
						<div class="page-content col-md-8">
							<div class="blog-area blog-classic right-sidebar">
								<div class="row row-tb-20">
									<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
	
									   <?php  get_template_part( 'post-format/single', get_post_format() ); ?>
	
									<?php endwhile; ?>
									
										<?php get_template_part('includes/related-posts'); ?>
										
										<?php comments_template(); ?>
	
									<?php else : ?>
	
									  <h2><?php esc_html_e('No Posts Found', 'froday') ?></h2>
	
									<?php endif; ?>
									
									
								</div>
							</div>
						</div>
						<div class="page-sidebar col-md-4">
							<?php if ( is_active_sidebar( 'blog-sidebar' ) ) { ?>
							<aside class="sidebar blog-sidebar">
								<div class="row row-tb-10">
									<?php dynamic_sidebar( 'blog-sidebar' ); ?>
								</div>
							</aside>
							<?php } ?>
						</div>
					<?php } else { ?>
						<div class="page-content col-md-8 col-md-offset-2">
							<div class="blog-area blog-classic right-sidebar">
								<div class="row row-tb-20">
									<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
	
									   <?php  get_template_part( 'post-format/single', get_post_format() ); ?>
	
									<?php endwhile; ?>
									
										<?php get_template_part('includes/related-posts'); ?>
										
										<?php comments_template(); ?>
	
									<?php else : ?>
	
									  <h2><?php esc_html_e('No Posts Found', 'froday') ?></h2>
	
									<?php endif; ?>
									
									
								</div>
							</div>
						</div>
					<?php } ?>
				<?php } ?>
			</div>
		</div>
	</div>
</main>

<?php get_footer(); ?>