Support

Account

Home Forums ACF PRO How to see $image[\'label\'] from \"choice field\" in gallery images Reply To: How to see $image[\'label\'] from \"choice field\" in gallery images

  • Thanks a lot !
    It’s working !

     $images = get_field('gallery');
    
                if ($images) : ?>
                    <div>
                        <?php foreach ($images as $image) : 
                            
                            $colors = get_field( 'essays', $image['ID'] );
    
    $value = $colors['value'];
    $label = $colors['label'];
                            
                            ?>
    
    <?php echo esc_attr($value); ?>
    <?php echo esc_attr($label); ?>