<h2 class="related-posts-heading">Related Posts</h2>
<?php 
$related = get_posts( array( 'category__in' => wp_get_post_categories($post->ID), 'numberposts' => 4, 'post__not_in' => array ($post->ID) ) );
if ( $related ) foreach( $related as $post ) {
setup_postdata($post); ?>


	<?php if ( has_post_thumbnail() ) { ?>
	                        <div class="related-posts-container">
	                        <div class="related-posts-main">
							<div class="related-posts-fade">
								<div class="port-thumb"><div class="related-posts">
							<a href="<?php the_permalink() ?>"> <?php the_post_thumbnail('related-thumb'); ?></a></div></div></div>
							
					
						
					<h2 class="related-posts-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
						 
						 </div>
						 </div>
						
						
							<?php } ?>
						    
								
							

<?php }
wp_reset_postdata(); ?>



