Not able to retreive gallery in php in front end
-
Hello,
I’m trying to get the plugin to work, I added a gallery and filled it with pictures but when trying to display it in the front end all I get is an empty array.
Here is the code I’m using to retreive the pictures:
? <?php ? ? $id = get_the_ID(); ? ? $images = acf_photo_gallery('gallerie_photo', $id); ? ? if( count($images) ): ? ? ? ? foreach($images as $image): ? ? ? ? ? ? $full_image_url= $image['full_image_url']; ? ? ? ? ? ? ?> ? ? ? ? ? ? <li class="splide__slide " > ? ? ? ? ? ? ? ? <img src="<?php echo $full_image_url; ?>" alt="photos <?php the_title(); ?>" class="imgSlideLoc"> ? ? ? ? ? ? </li> ? ? <?php endforeach; endif; ? ? ?>
I verified I’m getting the id correctly. Any idea on what I’m doing wrong ?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Not able to retreive gallery in php in front end’ is closed to new replies.