<div class="medd">
<?php get_header(); ?>
<div id="post-media">
<div class="container">
		<div id="flexslider" class="flexslider">
		<ul class="slides">
<?php
$wp_query = new WP_Query(array('post_type' => 'gallery','posts_per_page'=> '4' ));
while ($wp_query->have_posts()) : $wp_query->the_post();
?>		
		<li>			
		<a href="<?php the_permalink(); ?>">
		 <?php if(has_post_thumbnail()){?><img src="<?php the_post_thumbnail_url('img-1095'); ?>" alt="<?php the_title(); ?>"> <?php }else{ ?>
        <img src="<?php bloginfo("template_url"); ?>/img/none.png">
        <?php } ?>
		</a>
		<div class="slider-caption">
		<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2></div>
		</li>
	<?php
endwhile;
wp_reset_query();
?>
					
	</ul>
	</div>	
	
<script>
jQuery(document).ready(function() {
  jQuery('#flexslider').flexslider({
    animation: "fade",	slideshowSpeed: 7000,
	animationSpeed: 600,
	randomize: false,
	prevText: "",
	nextText: "",
	after: function(slider) {
		jQuery('#flexslider .slider-caption').animate({bottom:0,}, 400)
	},
	before: function(slider) {
		jQuery('#flexslider .slider-caption').animate({ bottom:-105,}, 400)
	},
	pauseOnHover: true
  });
});
</script>	

</div>		

<div id="spical">
<div class="container">
<div id="post-media-balans">
<div class="cmdark_title"><b> <?php the_archive_title(); ?></b></div>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="bottom-main-media-contain">
<div class="bottom-contain-image">
<a href="<?php the_permalink(); ?>">
<?php if(has_post_thumbnail()){?><img src="<?php the_post_thumbnail_url('img-293'); ?>" alt="<?php the_title(); ?>"> <?php }else{ ?>
<img src="<?php bloginfo("template_url"); ?>/img/none.png">
<?php } ?></a>
</div>
<div class="bottom-contain-title"><h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2></div>
<div class="dark-meta">
<?php if($qaleb['singl-date-ac']=='1'){?><b><i class="fa fa-calendar-o" aria-hidden="true"></i> <?php the_time('d M Y'); ?></b><?php } ?>
<?php if($qaleb['singl-view-ac']=='1'){?><span><i class="fa fa-eye" aria-hidden="true"></i> <?php echo get_post_views (get_the_ID()); ?></span><?php } ?>
</div>
</div>
<?php endwhile; endif; ?>

<?php if (function_exists("pagination")) { pagination($additional_loop->max_num_pages); } ?>
</div>
</div></div>
</div>
<?php get_footer(); ?>
</div>