Note: This page describes shortcodes for NextGEN 2.0 and up. To see shortcodes for NextGEN Legacy (1.9.13 and earlier), please see our separate page on NextGEN Legacy Shortcodes.
Introduction and Basic Logic
NextGEN 2.0 introduces a new short code structure. This page describes everything you need to know to work fluidly with the new shortcodes.
We should start by emphasizing that you can now customize your galleries easily using the new Insert Gallery Window in your text editor. For the most part, you never need to use shortcodes again if you don’t want to.
The main places we think people may want to use these are:
- Widgets. You can’t use the Insert Gallery Window within a widget, so you’d need to use a shortcode.
- Page/Post Text Editor. If you prefer to use the text-based editor for pages or posts, you currently need to work with shortcodes, or go back and forth between visual and text editor. We are working on making the Insert Gallery Window more robust for use with text-based editing.
Let’s start with a sample shortcode that includes a lot of options.
The shortcode above will display gallery #1 as a NextGEN Gallery basic slideshow. It will exclude images #4 and #6 and will set the slideshow size as 600px X 400px. So that gives you a sense for what the shortcodes will look like. Now lets break them down.
This is the parameter that now introduces every NextGEN Gallery shortcode.
Following the ngg_images tag, identify is the source of the images you want to display. There are several options for the image source.
- gallery_ids=”1,3″ (retrieves galleries #1 and #3)
- album_ids=”1″ (retrieves album #1)
- tag_ids=”landscapes,florida beaches” (retrieves images tagged ‘landscapes’ or ‘florida beaches’)
- image_ids=”2,3,5″ (retrieves images 2, 3, and 5)
- source=”recent” (retrieves recently uploaded images)
- source=”random” (retrieves a random set of images)
You can also chose to include or exclude specific images based on their ids.
- gallery_ids=”1,3″ exclusions=”4,6″ (excludes images #4 and #6)
- album_ids=”1,2″ exclusions=”a1″ (excludes sub album #1)
Following the image source, specify the display type. Here is a list of all available display types in NextGEN Gallery and NextGEN Pro.
For each NextGEN Gallery type, there is a large range of parameters and settings you can apply. These are all now visible in NextGEN Gallery 2.0’s new Insert Gallery Window. But you can also apply them using parameters within shortcodes. We are working on compiling an entirely complete list of every available shortcode parameter in NextGEN Gallery (there are a lot). For now, to give you a sense for what the options look like, consider the following parameters for slideshows and thumbnail galleries.
Example: Common Parameters for NextGEN Basic Slideshows
*where are the flash slideshow options? Please read here…
Example: Common Parameters for NextGEN Basic Thumbnail Gallery:
- override_thumbnail_settings=”1″ (required to override default thumbnail setting within shortcodes)
- slideshow_link_text=”View Slideshow”
Two general points:
- For any parameters you do not define via shortcode, the gallery will adopt whatever default setting you have in NextGEN Gallery options panel (under Gallery > Gallery Settings). So if you don’t set the gallery width and height for a slideshow in a shortcode, the slideshow will just adopt the default gallery width and height that you’ve designated under Gallery > Gallery Settings > NextGEN Basic Slideshow.
- For any parameters that are either Yes or No, you can use a “1” to indicate Yes or a “0” to indicate No.
Examples of Standard Shortcodes
Below are the standard shortcodes for NextGEN and NextGEN Pro gallery and album types. We provide this for those who would like to copy and paste the shortcodes.
NextGEN Basic Thumbnail Gallery
NextGEN Basic Slideshow Gallery
NextGEN Basic Image Browser Gallery Gallery
NextGEN Basic SinglePic
NextGEN Basic Tag Cloud
NexGEN Basic Extended Album
NextGEN Basic Compact Album
NextGEN Pro Thumbnail Gallery
NextGEN Pro Slideshow Gallery
NextGEN Pro Filmstrip Gallery
NextGEN Pro Film Gallery
NextGEN Pro Masonry
NextGEN Pro BlogStyle Gallery
NextGEN Pro Grid Album
NextGEN Pro List Album