Php 如何在Nextgen Gallery Wordpress中从页面动态获取Gallery ID

Php 如何在Nextgen Gallery Wordpress中从页面动态获取Gallery ID,php,wordpress,nextgen-gallery,Php,Wordpress,Nextgen Gallery,我想从nextgen gallery wordpress获取附加到自定义模板php文件中的帖子/页面的库id。到目前为止,我已经有了从nextgen画廊数据库中提取画廊图片的代码 <div id="ngg_lightbox"> <?php global $nggdb; $gallery = $nggdb->get_gallery(14, 'sortorder', 'ASC', true, 0, 0); foreach($gallery as $image) { ?>

我想从nextgen gallery wordpress获取附加到自定义模板php文件中的帖子/页面的库id。到目前为止,我已经有了从nextgen画廊数据库中提取画廊图片的代码

<div id="ngg_lightbox">
<?php 
global $nggdb;
$gallery = $nggdb->get_gallery(14, 'sortorder', 'ASC', true, 0, 0);
foreach($gallery as $image) {
?>    
    <a
    class="shutterset_2413"
    href="<?php echo $image->imageURL; ?>">
    </a>

<?php
}
?>
</div>

在上面的作品中,我已经手动指定了图库id,我想通过快捷码将图库id附加到特定页面。谁能帮我一下吗?

你不能这样做吗?不,我使用自定义标记,所以我不能使用快捷码。