Wordpress NextGEN combines images from a specific album

I would like to quote images of a specific album in NextGen.

I want to use the NextGen album to create slideshows in headers in headers.php headers. Sort of:

loop through images in album = x: $src = src of image $title = title of image echo $src and $title 

How to do it?

Found a solution:

 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; } 

All other attributes of $ image can be printed, and

+6
source share
1 answer

Answering a question using zvinxs solution:

 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; } 
+9
source

Source: https://habr.com/ru/post/909533/


All Articles