	
<?php  

$posts = get_field('related');
if (!empty ($posts)) {
	//var_dump($posts);
	?>

<div id="related" class="section bege">
<div class="container">



    	<div class="rel-title"><?php the_field('related_title')?></div>
   
    

<div id="related-boxes">
	<div class="row">
    <?php foreach( $posts as $post): // variable must be called $post (IMPORTANT) ?>
        <?php setup_postdata($post); ?>
     
     <div class="col-lg-4 col-md-6">     
     	
    		 <?php  get_template_part('parts/articlesloop'); ?>
     </div><!--col-->
                
        
    <?php endforeach; ?>

    <?php wp_reset_postdata(); ?>

 </div><!--row-->  
</div><!--related-boxes-->



</div><!--container-->
</div><!--related-->
<?php } ?>