<?php get_template_part('header');?>
  <body <?php body_class();?>>
 	<?php get_template_part('topbar');?>
   <?php get_template_part('logoarea');?>
    <div class="wrapper" id="maincontent">
    	<div class="container">
   <?php 
	if ( have_posts() ) {?>
    <div class="content-heading">
    			<h2><?php the_title(); ?></h2>
            </div>
            <div class="relative">
		<div class="row nonfeaturedposts isotopefilter" data-id="archivecontent">
		<?php while ( have_posts() ) {the_post();  ?>
					<div class="col-sm-3 col-xs-6">
                	<div <?php post_class("post"); ?>>
                		<a href="<?php the_permalink(); ?>"><?php the_title();?></a>
                        <h3><?php the_title();?></h3>
                        <small><?php _e( 'Author: ', 'activehost');?><?php the_author();?></small> 
                        <small><?php _e( 'Category: ', 'activehost');?><?php
						$i = 0;
						$categories = get_the_category();
						foreach($categories as $cat){$i++;
							if($i!=1){
								echo esc_html(", ".$cat->cat_name);
							}else{
								echo esc_html($cat->cat_name);
							}
						}
						?></small>
    
                        <div class="post-image"><?php the_post_thumbnail(); ?><span><i class="glyphicon glyphicon-calendar"></i><?php the_time('jS M'); ?></span></div>
                         <?php the_excerpt(); ?>
                     </div>
                </div>
		<?php } // end while ?>
		</div>
        <?php paginate_links();?>
   </div>
	<?php } // end if ?>
    
    	</div>
    </div>
 <?php get_template_part('footer');?>