Support

Account

Home Forums Add-ons Gallery Field ACF Gallery skip first image of gallery field Reply To: ACF Gallery skip first image of gallery field

  • 
    <?php 
      $gallery_images = get_field('afbeeldingen_gallerij');
      $skip = true;
      if( $gallery_images ):
        foreach( $gallery_images as $image ):
          if ($skip) {
            $skip = false;
            continue;
          }
          ?>
            <a href="<?php echo 
                $image['sizes']['lightbox']; ?>" rel="prettyPhoto[<?php 
                global $post; $post_slug=$post->post_name; echo $post_slug; ?>]"></a>
          <?php 
        endforeach;
      endif;
    ?>