How to display ACF field from the category products on the home page?

Good evening, we've created an ACF field which is displayed in the same taxonomy category (regular text area) and created for the home page field in the Record (Relationship) in which I deduce the goods . Actually that's the output of goods (the output goods works fine )
<?php if( $products ): ?>
 <div class="row grid">
 <?php foreach( $products as $post): ?>
 <?php setup_postdata($post); ?>

 <?php 
 global $product;
 // $cate = get_queried_object(); 
$terms = get_the_terms( $post->ID, 'product_cat' );
$docs = get_field('extra_class', $terms);
 // print_r($docs);
?>
 <div class="col-lg-3 col-md-3 u-col grid-item all">
 ........ 
</div>
 <?php endforeach; ?>
 <?php wp_reset_postdata(); ?> 
</div>
 <?php endif; ?>

But I can not get this box which I put in the category .
How can I be ? could you tell me please ?
April 7th 20 at 10:42
0 answer

Find more questions by tags WordPressWooCommerce