Gallery shortcodes and custom fields

(this post is still very much a work in progress!)

Below are some examples of gallery ‘shortcodes’ to demonstrate how customised scripts can be used with NEXTgen galleries to display different captions, links etc. The main application of these on the CBP site is the ‘Painters’ page where the captions beneath the image thumbnails link not to the images but to the portfolio pages for each artist. Achieving this now relies on some non-standard practices and is hard to find up to date documentation on. The additional plugin which we use (NGG custom fields) has long ago been discontinues and may eventually just break in which case we will need to find another solution but for the time being this is the way we achieve it.

Customising NGG Gallery templates and using custom fields

Useful (if out of date) tech posts:


example 1: gallery-caption.php

example 2: gallery.php