官方参考方法:http://wordpress.org/extend/plugins/nextgen-gallery/faq

1. 插入一个幻灯片: slideshow id=x w=width h=height
效果预览: nextgen.boelinger.com/slideshow

2. 插入一个相册: album id=x template=extend 或 album id=x template=compact
效果预览: nextgen.boelinger.com/album/

3. 插入一个图集: nggallery id=x
效果预览: nextgen.boelinger.com/gallery-page

4. 插入一张图片: singlepic id=x w=width h=height mode=web20|watermark float=left|right
#mode 是可选项,可选参数有 web20(倒影效果),watermark(水印效果)
#float 是可选项,可选参数有 left(左对齐),right(右对齐)
效果预览: nextgen.boelinger.com/singlepic/

5. 插入图片浏览器: imagebrowser id=x
效果预览: nextgen.boelinger.com/image-browser

如果想要在任意页面中插入幻灯显示的相册照片,也可以按照如下格式,插入php代码:

<?php
if (function_exists(’nggSlideshowWidget’))
{nggSlideshowWidget($galleryID,$Width,$Height);}
?>

参数说明:
$galleryID : 相册编号
$Width : 宽度
$Height : 高度

如果说想显示相册编号为 3,宽度为 320 px ,高度为 240 px,插入以下代码就可以了:

<?php
if (function_exists(’nggSlideshowWidget’))
{nggSlideshowWidget(3,320,240);}
?>

本文链接地址: NextGEN Gallery的调用