0
I’m using a mixture of Wordpress plugin with PHP code to manage to perform a task that is to join all the images of a particular post in a gallery.
I would like, in this code below, to know how I could play all the returned images in one 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 the real shows her in a full-size lightbox.
What is currently happening is that as the link and the image are inside the foreach, every turn of the foreach, it creates a new lightbox and what I wanted was to put it all together in one gallery.
But what it would be like to "put it all together in one gallery" ?
– LocalHost