How to take the images that are returning and turn into a gallery?

Asked

Viewed 39 times

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.

O que eu queria é como colocá-las dentro de um mesma slideshow??

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" ?

1 answer

0

I don’t know if I understand your problem, because your question got a little confused But take a look at the documentation of the plugin that is using lightbox. Depending on which one you’re using, a simple rel='lightbox[galeria]' resolves.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.