Support

Account

Home Forums ACF PRO Custom gallery image link Reply To: Custom gallery image link

  • Each image has an image ID, you use this ID to get the custom fields.

    Example:

    
    foreach ($images as $image) {
      $value = get_field('your custom field name', $image['ID']);
    );
    

    or something like:

    
    foreach ($images as $image) {
      ?>
        <a href="<?php the_field('your link field name here', $image['ID']; ?>">something here</a>
      <?php 
    );