Home Forums Add-ons Gallery Field ACF Gallery vs WPML Reply To: ACF Gallery vs WPML

  • @daretothink
    Try the following, I think its failing because the id and image vars are outside your loop:

    global $sitepress;
    if( $awards_images ): ?>
        <ul class="press awards cf">
            <?php foreach( $awards_images as $awards_image ): 
    $current_main_id = icl_object_id( get_the_id(), 'post', true, $sitepress->get_default_language() );		
    $awards_images = get_field('our_wines_awards', $current_main_id);
                     <img src="<?php echo $awards_image['sizes']['large']; ?>" alt="<?php echo $awards_image['alt']; ?>" />
            <?php endforeach; ?>
    <?php endif; ?>