<div class="dnnc_slider_wrap dnnc_border_main">
	<?php 
	$dannci_redux = get_option( 'dannci_redux' );
	if (isset($dannci_redux['dnnc-slider-cats']) && !empty($dannci_redux['dnnc-slider-cats'])) {
    $slider_categ = $dannci_redux['dnnc-slider-cats'];
	
	$my_query = new WP_Query('showposts='. $dannci_redux['dnnc-slider-nr'] .'&cat='. implode(",", $slider_categ) .'');	 
	if ($my_query->have_posts()) :

        wp_enqueue_script('owl-carousel', get_template_directory_uri().'/js/owl.carousel.min.js','','', true);
        wp_enqueue_script('owl-slider-start', get_template_directory_uri().'/js/owl.slider.start.js','','', true);

	?>

    <img class="slider_spinner" src="<?php get_template_directory_uri().'/images/tail-spin.svg'; ?>" width="40" alt="">
            
    <div class="dnnc_slider loop owl-carousel loading">
    
        <?php while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID; ?>	

            <div class="dnnc_slider_inn">

                <div class="slider_col slider_col_left">

                    <a href="<?php the_permalink(); ?>">
                            
                        <?php the_post_thumbnail( 'visby_slider',array('class' => "dnnc_tranz dnnc_slider_img")); ?>
                    
                    </a>

                </div>

                <div class="slider_col slider_col_right"> 

                    <?php visby_meta_front();  ?>

                    <h2 class="large_title"><a class="link link--forsure" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

                    <p class="dnnc_teaser"><?php echo visby_excerpt( get_the_excerpt(), '360'); ?><span class="helip">...</span></p>

                    <?php visby_meta_more();  ?>
                
                </div>

            </div><!-- end .dnnc_slider_inn -->
    
        <?php  endwhile; ?>
        
                
	<?php endif; ?>    

	</div>
    
	<?php  } else { echo '<h3 class="cntr">'. esc_html__('Please select featured categories (for slider) in the admin panel. You can select as much categories as you want.','visby').'</h3>';}?>
    
</div><!-- end .tmnf_slider_wrap -->
<div class="clearfix"></div>