title: ACF gallery show first image and open lightbox on click
body: <p>I'm trying to create an archive page to show some realisations, which all have a gallery with multiple images. I use ACF to create a gallery and the Simple Lightbox plugin to create the lightbox. I found an example on how to combine both plugins and it's close to what I need, but I can't figure the rest out myself.</p>
  <p>Now all images from the gallery are showing, I only need the first image to show and when you click the image I want to open the image in lightbox and have the possibility to go through the gallery this way.</p>
  <p><strong>What I have so far:</strong></p>
  <pre><code>&lt;?php if ( have_posts() ) {
          while ( have_posts() ) { the_post(); ?&gt;
              &lt;article id=&quot;realisatie-&lt;?php the_ID(); ?&gt;&quot; &lt;?php post_class(); ?&gt; style=&quot;background-image: url(&lt;?php echo $images[0] ?&gt;);&quot;&gt;
                  &lt;?php
                  $images = get_field('realisatie_beelden');
                  $image_1 = $images[0];
                  if( $images ) { ?&gt;
                  &lt;div class=&quot;realisatie__gallery&quot; &gt;
                      &lt;?php foreach( $images as $image ) {
                          $content = '&lt;a class=&quot;gallery_image&quot; href=&quot;'. $image .'&quot;&gt;';
                          $content .= '&lt;img src=&quot;'. $image .'&quot; alt=&quot;'. $image .'&quot; /&gt;';
                          $content .= '&lt;/a&gt;';
                          
                          if ( function_exists('slb_activate') ) {
                              $content = slb_activate($content);
                          }
                          ?&gt;
                      &lt;?php } ?&gt;
                  &lt;/div&gt;
                  &lt;?php } ?&gt;
              &lt;/article&gt;
          &lt;?php }
      } ?&gt;
  </code></pre>