Support

Account

Home Forums ACF PRO Post Object field and Woocommerce price product

Unread

Post Object field and Woocommerce price product

  • Hi =)
    <?php woocommerce_template_loop_price(); ?>
    how do i make it work?

    <?php
    
    $post_objects = get_field('dr2');
    
    if( $post_objects ):
     ?>
     
        <?php foreach( $post_objects as $post_object):
    	 
    	     ?>
        
    
          
        <div class="col-lg-4 col-md-6 col-sm-6 inloop-product">
            <div class="product-wrap mb-60">
                <div class="product-img default-overlay">
                    <a href="<?php echo get_permalink($post_object->ID); ?>">
                     <img class="default-img" src="<?php echo get_the_post_thumbnail_url( $post_object->ID, 'thumbnail' ) ?>" alt="">
                     <img class="hover-img" src="<?php the_field('ava2', $post_object->ID); ?>" alt="">
                    </a>
                                    
                </div>
             <div class="product-content-2 text-center">
              <h3><a href="<?php the_permalink(); ?>"><?php echo get_the_title($post_object->ID); ?></a></h3>
                <div class="product-price">
                 <span class="new-price"><?php woocommerce_template_loop_price(); ?></span><div class="kupit"><a href="<?php echo get_permalink($post_object->ID); ?>">Buy</a>
                </div>
             </div>
             </div>
            </div>
        </div>
        
        
        <?php endforeach; ?>
        
    <?php endif; ?>
    
Viewing 1 post (of 1 total)

The topic ‘Post Object field and Woocommerce price product’ is closed to new replies.