<?php get_header(); ?>

			<div id="content">
				
						<div id="inner-content" class="wrap cf post-content-single">
						<div class="m-all t-2of3 d-5of7 cf blog-list">

						<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
							
         					<article id="post-<?php the_ID(); ?>" <?php post_class( 'item' ); ?>>
			  					<?php get_template_part( 'post-content/post', 'blog'); ?>
							</article>

						<?php endwhile; ?> <?php endif; ?>

						<?php 
							if ( get_theme_mod('thefashblog_author_bio',true) ) :
								$author_class = '';
							else:
								$author_class = ' ' . 'author-hide';
							endif;
						?>

		                <footer class="article-footer <?php echo  esc_attr($author_class); ?>">
		                  <div class="avatar">
		                  	<?php echo get_avatar( get_the_author_meta( 'ID' ) , 100 ); ?>
		                  </div>
		                  <div class="info">
			                  <p class="author"><?php the_author(); ?></p>
			                  <p class="author-desc"> <?php if (function_exists('thefashblog_author_excerpt')){echo thefashblog_author_excerpt();} ?> </p>
		                  </div>
		                  <div class="clear"></div>
		                </footer> <?php // end article footer ?>

		                <?php $related = get_posts( array( 'category__in' => wp_get_post_categories($post->ID), 'numberposts' => 3, 'post__not_in' => array($post->ID) ) ); ?>
		                    <?php if (!empty($related)): ?>
			                    <div class="related-posts <?php echo esc_attr( $related_class ); ?>">
				                    <h3 class="section-title"><?php _e('You may also like ','the-fash-blog'); ?></h3>
				                    <div> 
					                    <?php if( $related ): foreach( $related as $post ) { ?>
					                    <?php setup_postdata($post); ?>

					                            <div class="related-item">
					                              <div class="related-image">
						                              <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
						                                <?php $image_thumb = thefashblog_catch_that_image_thumb(); $gallery_thumb = thefashblog_catch_gallery_image_thumb(); 
						                                if ( has_post_thumbnail()):
						                                	the_post_thumbnail('thefashblog-thumb-600');  
						                                elseif(has_post_format('gallery') && !empty($gallery_thumb)): 
						                                	echo $gallery_thumb; 
						                                elseif(has_post_format('image') && !empty($image_thumb)): 
						                                	echo $image_thumb; 
						                                else: ?>
						                                <?php $blank = get_template_directory_uri() . '/images/blank.jpg'; ?>
						                                <img src="<?php echo esc_url($blank); ?>">
						                                <?php endif; ?>
						                              </a>
					                              </div>

					                              <div class="related-info">
					                                  <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
					                                  
					                              </div>
					                               
					                            </div>
					                    
					                    		<?php } endif; wp_reset_postdata(); ?>
					                     		
				                      </div>
				                      <div class="clear"></div>

			                     </div>
		                     	<?php endif; ?>
		                
		                <?php comments_template(); ?>
						</div>

						<?php get_sidebar(); ?>
						<div class="clear"></div>
					</div>
					

			</div>

<?php get_footer(); ?>