Wordpress NextGEN循环播放特定专辑中的图像

Chr*_*fer 6 wordpress nextgen-gallery

我想在NextGen中浏览特定专辑的图像.

我想使用NextGen相册在主题header.php中创建横幅幻灯片.就像是:

loop through images in album = x:
$src = src of image
$title = title of image
echo $src and $title
Run Code Online (Sandbox Code Playgroud)

这该怎么做?

找到了解决方案:

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;
 }
Run Code Online (Sandbox Code Playgroud)

还可以打印所有其他$ image属性

dav*_*vid 9

zvinxs解决方案回答问题:

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;
 }
Run Code Online (Sandbox Code Playgroud)