<?php get_header(); ?>
	<div class="featured-image">
		<?php
		if(ale_get_option('featuredimagegallery')){
			echo '<img src="'.esc_url(ale_get_option('featuredimagegallery')).'" alt>';
		} else{
			echo '<img src="http://placehold.it/1920x125/ece6d9/8d7a65&amp;text=No+image" alt>';
		}?>
	</div>
	<div class="page-block wrapper clearfix">
		<?php get_sidebar(); ?>

		<div class="page-content col-8 gallery">
			<?php get_breadcrumbs(); ?>

			<h1><?php _e('Gallery', 'aletheme'); ?></h1>
			<?php 
			wp_reset_query();
			if (have_posts()) : while (have_posts()) : the_post(); ?>
				<div class="article">
					<a href="<?php the_permalink(); ?>">
						<?php if(get_the_post_thumbnail($post->ID,'gallery-thumba')){
							echo get_the_post_thumbnail($post->ID,'gallery-thumba');
						} else{
							echo '<img src="http://placehold.it/220x194/ece6d9/8d7a65&amp;text=No+image" alt>';
						}?>
						<span><?php _e('plus', 'aletheme');?></span>
					</a>
					<h2><?php the_title(); ?></h2>
					<span class="time"><?php the_time('F j, Y'); ?></span>
				</div>
			<?php endwhile;  endif;?>
			<div class="pagination">
				<?php ale_page_links(); ?>
			</div>
		</div>
	</div>
<?php get_footer(); ?>