There are two parts to creating a gallery of images: 1) selecting the images you want to display and 2) formatting the gallery display.
Selecting the images – The WordPress Media Manager modal window has a convenient “Create Gallery” feature that adds a [gallery]
shortcode to a post or page and uses the ids=
parameter to specify a list of images for display. The [mla_gallery]
shortcode supports the ids=
parameter and has many additional parameters for selecting images, such as category and tag support or custom field queries.
Formatting the gallery – There are many “lightbox” and “slideshow” plugins. Some of these use their own shortcodes, but most intercept the [gallery]
shortcode and add parameters to the gallery items that activate the lightbox display when the gallery is displayed or an image in the gallery is clicked. MLA supports one lightbox plugin, Photonic Gallery, directly. You can also use [mla_gallery]
to select the images and then hand off control to another plugin for formatting the results using the “Support for Other Gallery-generating Shortcodes”; see the Settings/Media Library Assistant Documentation tab for more information.
For example, if you want to select images using the MLA Att. Category taxonomy but want to display a Jetpack “Tiled Mosaic” gallery, you can code:
[mla_gallery attachment_category=vegetable tax_operator="NOT IN" mla_alt_shortcode=gallery type="rectangular"]
This example selects all the images that are “NOT IN” the Att. Category “vegetable”. The selected images are passed to the [gallery] shortcode in an “ids” parameter, along with the “type=rectangular” parameter. The result is as if you had coded:
[gallery ids="1,2,3" type="rectangular"]
The Jetpack Tiled Mosaic gallery plugin detects the type="rectangular"
parameter to activate its display. Of course, if you don’t need the data selection features of [mla_gallery]
you can just use the [gallery]
shortcode directly.
If you install the Photonic Gallery plugin MLA will find it and automatically use it when type=default
is added to an [mla_gallery]
shortcode. Photonic Gallery has both lightbox and slideshow displays; here is an example that will open a full-size image in a lightbox when you click on the thumbnail in the gallery:
[mla_gallery ids="921,920,919,918,917,916" type=default style=launch]
Many lightbox plugins, such as Easy FancyBox, will look for the <img src=
tags in a gallery and automatically launch a lightbox when you click on an image in the gallery. If you install Easy FancyBox, lightbox display is automatic if you code your shortcode like this:
[mla_gallery ids="921,920,919,918,917,916" link=file]
As I said, there are many lightbox plugins in the WordPress repository. If you find one you like and have an issue with it, let me know. I am marking this topic resolved, but if you have problems or further questions please update it and I will give you whatever help I can. Thanks for your interest in the plugin.