<?php while($slider -> have_posts()) : $slider->the_post(); ?>
<div class="slide">
<div class="slide-top"><?php the_title();?></div>
<div class="slide-bottom"><?php the_content();?></div>
<?php the_post_thumbnail();?>
</div>
<?php endwhile; ?>
<?php
$slide_iteration = 0;
while($slider -> have_posts()) : $slider->the_post(); $slide_iteration++;
?>
<div class="slide <?php if( $slide_iteration== 1 ) echo ' active' ?>">
<div class="slide-top"><?php the_title();?></div>
<div class="slide-bottom"><?php the_content();?></div>
<?php the_post_thumbnail();?>
</div>
<?php endwhile; ?>
<?php $i = true; ?>
<?php while($slider -> have_posts()) : $slider->the_post(); ?>
<?php if($i) { ?>
<div class="slide active">
<?php $i = false; ?>
<?php } else { ?>
<div class="slide">
<?php } ?>
<div class="slide-top"><?php the_title();?></div>
<div class="slide-bottom"><?php the_content();?></div>
<?php the_post_thumbnail();?>
</div>
<?php endwhile; ?>