<section class="category">
 <div class="container">
    <div class="row">
    	<?php the_field('cato-title'); ?>



<div class="all-categories">
     <?php if( have_rows('category') ): ?>
      <?php while( have_rows('category') ): the_row(); ?>

      <div class="block col-12">
      	<a title="<?php the_sub_field('title'); ?>" href="<?php if(get_sub_field('link') != NULL){ echo get_term_link( get_sub_field('link') , 'product_cat' ); } ?>">
      	<div class="box">
      		<div class="img"><img alt="" src="<?php the_sub_field('img'); ?>"></div>
      		<span><?php the_sub_field('title'); ?></span>
      	</div>
      	</a>
      </div>
       


      <?php endwhile; ?>
     <?php endif; ?> 
</div>


	</div>
  </div>
</section>
