I'm using a mixture of WordPress plugin with PHP code to be able to perform a task that is to join all the images of a certain post in a gallery.
I would like, in this code below, to know how I could play all the images returned in a gallery and show one after another.
if( class_exists('Dynamic_Featured_Image') ) {
$featured_images = $dynamic_featured_image->get_featured_images();
foreach ($featured_images as $f_images) {
$thumb = str_replace('150x150', '328x400', $f_images['thumb']);
$real = $f_images['full'];
echo "<a href=".$real." rel='lightbox'>";
echo "<img src=".$thumb." rel='lightbox' />";
echo "</a>";
}
}
The $featured_images
returns an array of images with two types of images that I rename each type as $thumb
and $real
. The thumb shows her small real shows her in a lightbox at actual size.
What is currently happening is that as the link and image are inside the foreach, every back of the foreach, it creates a new lightbox and what I wanted was to put everything together in a gallery.