<?php get_header(); ?>
<?php include('tophead.php') ?>
<div class="container">
<div class="row">
<div class="col-md-8 col-lg-6 order-2 px-0">
    <?php if (have_posts()) : ?>
 <?php while (have_posts()) : the_post(); ?>
  <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
	  <div class="card mb-3">
				<div class="cardtop"><img class="card-img-top" src="<?php echo catch_that_imageurl(); ?>" alt="<?php the_title(); ?>" /></div>

    <div class="card-body">
      <h3 class="card-title"><?php the_title(); ?></h3>
    </div>

			</div>  </a>
<?php endwhile; ?>
    <nav>
  <?php
   global $wp_query, $wp_rewrite;
   $wp_query->query_vars['paged'] > 1 ? $current = $wp_query->query_vars['paged'] : $current = 1;
	echo seanpaginate_links(array(
	'prev_next'          => 1,
	'type'          => 'list',
	'mid_size'           => 3,
	'current' => $current,
));
?>
	</nav>
	    <?php else : ?>

		<h2 class="center">Not Found</h2>
		<p class="center">Sorry, but you are looking for something that isn't here.</p>
		<?php get_search_form(); ?>

	<?php endif; ?>
    </div>
<?php include('leftsidebar.php') ?>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>