<?php 

		if( 'no' != get_theme_mod( 'store_prima_show_slider', 'yes' ) ): 

			if( '' != get_theme_mod( 'store_prima_slider_id' ) && 'select' != get_theme_mod( 'store_prima_slider_id' ) ){

				$store_prima_slider_id = get_theme_mod( 'store_prima_slider_id' );

			}else{

				$store_prima_slider_id = store_prima_get_random_post();

			}

			$store_prima_slider_post = get_post($store_prima_slider_id);	

	?>  
	<div class="site-slider">

		<div class="owl-carousel-slide">
                
                <?php if ( has_post_thumbnail($store_prima_slider_id)) : ?>	
                <?php echo '<img src="' . esc_url(get_the_post_thumbnail_url($store_prima_slider_id, 'full')) . '" />'; ?>
                <?php else : ?>
                    <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/images/front-page-slider.jpg">
                <?php endif; ?>
				
				<div class="owl-carousel-caption-overlay">
				
					<div class="owl-carousel-caption-container">
						<h3>
							<a href="<?php echo esc_url(get_the_permalink($store_prima_slider_id)); ?>">
							<?php echo esc_html($store_prima_slider_post->post_title); ?>
							</a>
						</h3>
						<div class="owl-carousel-caption">
							<p><?php echo  esc_html(store_prima_limitedstring($store_prima_slider_post->post_content)); ?></p>
							<p><a href="<?php echo esc_url(get_the_permalink($store_prima_slider_id)); ?>"><?php esc_html_e( 'Read More', 'store-prima' ); ?></a></p>
						</div>
					</div>					
				
				</div>
                 	
		</div>		
    
    </div><!-- .site-slider -->
	<?php endif; ?>