Luxor
Luxor

Reputation: 45

Show All Images of NextGEN Gallery from Multiple Gallery ID

The following code is the way to display all images from specific gallery ID and it works!

global $nggdb;
$gallery = $nggdb->get_gallery(8, 'sortorder', 'ASC', true, 0, 0);
foreach($gallery as $image) {
    echo $image->imageURL;
    echo $image->alttext;
    echo $image->description;
 }

but what I want is to show all images from multiple album ID? anyone can help me? please...

Upvotes: 0

Views: 2326

Answers (1)

Sadikhasan
Sadikhasan

Reputation: 18600

Try this

global $nggdb;
foreach($ids as $id) {
$gallery = $nggdb->get_gallery($id, 'sortorder', 'ASC', true, 0, 0);
        foreach($gallery as $image) {
            echo $image->imageURL;
            echo $image->alttext;
            echo $image->description;
         }
 }

Upvotes: 2

Related Questions