只需将此样式添加到您的nggallery。css文件,仅显示库中的第一个图像。单击缩略图时,灯箱效果将显示所有图像。无需PHP代码:
/* For NextGen Gallery. Displays thumbnails on a page, and when you click each thumbnail opens it\'s own gallery. Normally when you insert a gallery, it displays all the thumbnails in the gallery. This hack will hide all the thumbnails except the first one. Make sure you don\'t display [show slideshow], because that will be the first child. */
div.ngg-gallery-thumbnail-box { display:none; }
div.ngg-galleryoverview div:first-child { display:block; }