<?php if(get_theme_mod('roland_blog_enable')) : ?>
	<!-- Blog Area -->	
	<section class="blog-area-latest">
		<?php $roland_blog_left_img = get_theme_mod('roland_blog_left_img');	?>
		<!-- Blog Main -->
		<div class="blog-welcome" style="background-image:url('<?php echo esc_url($roland_blog_left_img); ?>')">
			<div class="blog-title text-center">
				<?php
					$roland_blog_title = get_theme_mod('roland_blog_title');
					$roland_blog_content = get_theme_mod('roland_blog_content');
					$roland_blog_button_link = get_theme_mod('roland_blog_button_link');
				?>
			
				<h2><?php echo esc_html($roland_blog_title); ?><span><?php echo esc_html($roland_blog_content); ?> </span></h2>
				<div class="blog-button">
					<a href="<?php echo esc_url($roland_blog_button_link); ?>" class="theme-btn"><?php echo esc_html_e('View All News','roland');?></a>
				</div>
			</div>
		</div>
		<!-- End Blog Main -->
		<div class="container">
			<div class="row">
				<div class="col-lg-8 offset-lg-4 col-md-8 offset-md-4 col-12">
					<div class="blog-slider">
						<?php
							$roland_blog_catId = esc_attr(get_theme_mod( 'roland_blog_category_id'));
							$roland_blog_catLink = get_category_link($roland_blog_catId);
							$roland_blog_CatName = get_category($roland_blog_catId);
							$args = array(
								'post_type' => 'post',
								'posts_per_page' => 3,
								'post_status' => 'publish',
								'cat' => $roland_blog_catId,
							);
							$roland_blogloop = new WP_Query($args);
							
							while ($roland_blogloop->have_posts()) : 
							$roland_blogloop->the_post(); 
						?>
						<!-- Single Blog -->
						<div class="single-blog">
							<?php if(has_post_thumbnail()) : ?>
							<!-- Blog Head -->
							<div class="blog-head">
								<?php the_post_thumbnail('roland-blog-thumb'); ?>
								
								<?php if ( ! has_post_format( 'gallery') && ! has_post_format( 'video') ) :?>
									<span class="post-format"><i class="icofont-pencil-alt-5"></i></span>
								<?php endif; ?>
								<?php if ( has_post_format( 'gallery' )) :?>
									<span class="post-format"><i class="icofont-photobucket"></i></span>
								<?php endif; ?>	
								<?php if ( has_post_format( 'video' )) :?>
									<span class="post-format"><i class="icofont-video"></i></span>
								<?php endif; ?>	
							</div>
							<?php endif;?>
							<div class="single-blog-content">
								<h2 class="blog-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
								<div class="entry-content"><?php the_excerpt();?></div>
								<!-- Blog Meta -->
								<div class="blog-meta">
									<div class="single-meta">
										<span><i class="icofont-ui-user"></i><?php roland_posted_by(); ?></span>
									</div>
									<div class="single-meta">
										<span><i class="icofont-clock-time"></i><?php the_time(get_option('date_format')); ?></span>
									</div>
									<div class="single-meta">
										<span><i class="icofont-speech-comments"></i><?php echo esc_html(get_comments_number());?></span>
									</div>
								</div>
								<!-- End Blog Meta -->
							</div>
						</div>
						<!-- End Single Blog -->
						<?php endwhile;
							wp_reset_postdata();
						?>	
					</div>
				</div>
			</div>			
		</div>	
	</section>	
	<!-- End Blog Area -->
<?php endif;?>